{
  "version": "2026.2.0",
  "title": "Master Production & Site-Build Quality System",
  "description": "Context-aware, zero-defect production engineering blueprint with Form vs. Survey and Tech Stack Decision Engines.",
  "standards": [
    "Core Web Vitals 2026",
    "AEO / GEO 2026",
    "WCAG 2.1 AA",
    "FTC & CSLB Compliance",
    "Cloudflare Edge Standards"
  ],
  "categories": [
    {
      "id": "tech-stack",
      "name": "Tech Stack & Edge Architecture",
      "icon": "cpu",
      "color": "blue",
      "description": "Foundation layer to prevent build timeouts, 404 hops, and runtime server crashes.",
      "items": [
        {
          "id": "tech-ssg",
          "title": "SSG First Framework Architecture",
          "priority": "CRITICAL",
          "tags": [
            "Architecture",
            "Performance"
          ],
          "summary": "Use Astro SSG for multi-location (100+ pages) or Next.js App Router (Static Export) for Headless CMS.",
          "details": "Static generation ensures 0kb runtime JS by default, sub-50ms TTFB globally, and zero server crashes during ad spend spikes.",
          "code_snippet": "// astro.config.mjs\nexport default defineConfig({\n  output: 'static',\n  trailingSlash: 'always'\n});",
          "archetype": "universal"
        },
        {
          "id": "tech-edge-hosting",
          "title": "Cloudflare Pages Deployment",
          "priority": "CRITICAL",
          "tags": [
            "Hosting",
            "Edge"
          ],
          "summary": "Deploy to Cloudflare Pages for unlimited free static bandwidth and global edge CDN caching.",
          "details": "Cloudflare Pages beats raw Workers for websites because it provides unlimited static requests, native _headers/_redirects handling, and instant Git CI/CD.",
          "code_snippet": "npx wrangler pages deploy dist --project-name=\"your-project\"",
          "archetype": "universal"
        },
        {
          "id": "tech-sitemap-timeout",
          "title": "Deterministic Static Sitemap Generation",
          "priority": "HIGH",
          "tags": [
            "SEO",
            "Edge"
          ],
          "summary": "Never perform dynamic remote fetch() inside edge sitemap routes; compile URLs via static pre-build script.",
          "details": "Edge workers timeout at 10-15s when fetching hundreds of CMS posts during sitemap generation, silently truncating sitemap.xml in production.",
          "code_snippet": "// Pre-generate array in build step rather than async runtime fetch\nexport const staticRoutes = [...locationUrls, ...serviceUrls];",
          "archetype": "universal"
        },
        {
          "id": "tech-trailing-slash",
          "title": "Uniform Trailing Slash Enforcement",
          "priority": "HIGH",
          "tags": [
            "Technical SEO"
          ],
          "summary": "Universally enforce trailingSlash: 'always' (or 'never') across framework config and all <a href> links.",
          "details": "Mixing slashes causes internal 301 redirect chains, splits PageRank equity, and triggers crawler duplicate content warnings.",
          "code_snippet": "<!-- Good -->\n<a href=\"/services/\">Services</a>\n<!-- Bad (Causes 301 hop) -->\n<a href=\"/services\">Services</a>",
          "archetype": "universal"
        },
        {
          "id": "tech-404-handler",
          "title": "Authentic HTTP 404 Error Engine",
          "priority": "CRITICAL",
          "tags": [
            "Technical SEO",
            "Edge"
          ],
          "summary": "Ensure 404.astro or not-found.tsx compiles to dist/404.html returning genuine HTTP 404 status.",
          "details": "Missing 404 pages on Cloudflare return platform fallbacks or soft 200 OK headers, poisoning Google Search indexing.",
          "code_snippet": "---\n// src/pages/404.astro\n---\n<BaseLayout title=\"Page Not Found | 404\">\n  <h1>Page Not Found</h1>\n  <a href=\"/\">Return Home</a>\n</BaseLayout>",
          "archetype": "universal"
        },
        {
          "id": "tech-email-scrambling",
          "title": "Cloudflare Email Scrambling Guard (<!--email_off-->)",
          "priority": "HIGH",
          "tags": [
            "Technical SEO",
            "Cloudflare"
          ],
          "summary": "Wrap all mailto: links in <!--email_off--> comments to prevent crawler 404 errors.",
          "details": "Cloudflare automatically replaces plain mailto links with dynamic JS decoders. SEO crawlers parse this as /cdn-cgi/l/email-protection and record site-wide 404 broken link penalties.",
          "code_snippet": "<!--email_off-->\n<a href={`mailto:${site.email}`}>{site.email}</a>\n<!--/email_off-->",
          "archetype": "universal"
        }
      ]
    },
    {
      "id": "cro-funnel",
      "name": "CRO & Interactive Survey Funnels",
      "icon": "zap",
      "color": "amber",
      "description": "Progressive commitment architectures that produce up to 300% more verified leads than static forms.",
      "items": [
        {
          "id": "cro-4step-survey",
          "title": "4-Step Progressive Commitment Funnel",
          "priority": "CRITICAL",
          "tags": [
            "CRO",
            "Surveys"
          ],
          "summary": "Replace static long forms with an interactive 4-step visual survey (Scope -> Condition -> Urgency -> Contact).",
          "details": "Dividing questions into low-friction micro-steps eliminates form cognitive fatigue. Users who select 3 simple visual cards are 80%+ likely to finish the contact step.",
          "code_snippet": "Step 1: Visual Scope Cards (ADU / Garage / Teardown)\nStep 2: Property Specs (Flat lot / Slope / Size)\nStep 3: Timeline & Goal (Rental / Immediate)\nStep 4: Parcel Address + Name + Phone + Email",
          "archetype": "high-ticket"
        },
        {
          "id": "cro-autoadvance",
          "title": "Instant 300ms Auto-Advance on Radio Selection",
          "priority": "HIGH",
          "tags": [
            "CRO",
            "UX"
          ],
          "summary": "Enable Auto-Advance on slides 1-3 so tapping a choice immediately transitions to the next question.",
          "details": "Eliminates the friction of tapping an option and then hunting for a tiny 'Next' button at the bottom of the viewport.",
          "code_snippet": "// In GoHighLevel Survey Settings:\nAuto-Advance on Radio Selection: ON (Delay: 300ms)",
          "archetype": "high-ticket"
        },
        {
          "id": "cro-reassurance-microcopy",
          "title": "Microcopy Reassurance for Sensitive Fields",
          "priority": "MEDIUM",
          "tags": [
            "CRO",
            "Copy"
          ],
          "summary": "Provide a 1-line reassurance explaining WHY sensitive data (e.g. physical address) is required.",
          "details": "Visitors hesitate on address fields fearing sales visits. Explaining that the address checks municipal zoning bylaws restores trust.",
          "code_snippet": "<p class=\"text-xs text-slate-400\">\n  *Used solely to verify local municipal setbacks and zoning feasibility for your parcel.\n</p>",
          "archetype": "high-ticket"
        },
        {
          "id": "cro-phone-email-balance",
          "title": "Friction Balancing: Phone vs. Email Protocol",
          "priority": "CRITICAL",
          "tags": [
            "CRO",
            "Strategy"
          ],
          "summary": "Emergency niches = phone only; High-ticket quote & permit niches = mandatory email.",
          "details": "For tree falls or water leaks, email is pure friction. For ADU or architectural remodels, email is mandatory for formal PDF quotes and CRM deduplication.",
          "code_snippet": "// Emergency: One-tap dispatch call\n// Quote / Permit: Address + Phone + Email (enforce valid format)",
          "archetype": "universal"
        },
        {
          "id": "cro-skeleton-fallback",
          "title": "CRM Iframe Skeleton Loader & Phone Fallback",
          "priority": "CRITICAL",
          "tags": [
            "UX",
            "Resilience"
          ],
          "summary": "Never render naked iframes. Wrap in an animated skeleton loader with a prominent telephone fallback callout.",
          "details": "Iframes take 1.5-3s to render on mobile networks. Skeletons prevent layout shifts, and the fallback callout captures leads if ad-blockers block the CRM.",
          "code_snippet": "<div class=\"relative min-h-[480px]\">\n  <div id=\"skeleton\" class=\"animate-pulse bg-zinc-800 rounded-xl ...\"></div>\n  <iframe onload=\"document.getElementById('skeleton').style.display='none'\" ...></iframe>\n  <p class=\"mt-3 text-center text-sm\">Trouble loading? Call Planning Desk: <strong>(XXX) XXX-XXXX</strong></p>\n</div>",
          "archetype": "high-ticket"
        },
        {
          "id": "cro-url-prepopulate",
          "title": "Dynamic URL Parameter Passing to CRM",
          "priority": "HIGH",
          "tags": [
            "CRO",
            "Integration"
          ],
          "summary": "Pass dynamic city and service variables from SSG templates into CRM iframe src query parameters.",
          "details": "Enables GHL or CRM to auto-fill the target municipality and service into custom fields without user typing.",
          "code_snippet": "const ghlUrl = `https://api.leadconnectorhq.com/widget/survey/ID?city=${city}&service=${service}`;",
          "archetype": "high-ticket"
        },
        {
          "id": "cro-cta-copy-parity",
          "title": "Value-Driven CTA Copy & Lead Magnet Parity",
          "priority": "HIGH",
          "tags": [
            "CRO",
            "Copy"
          ],
          "summary": "Maintain 100% copy parity across buttons, headings, and surveys (e.g. 'Get a Free Property Assessment').",
          "details": "Ban dead action verbs ('Submit', 'Send'). Never invent mismatched terms (e.g. 'Feasibility Quiz' vs 'Estimate') that create funnel doubt.",
          "code_snippet": "<!-- Good -->\n<button>Get My Free Property Assessment</button>\n<!-- Banned -->\n<button>Submit</button>",
          "archetype": "high-ticket"
        }
      ]
    },
    {
      "id": "mobile-ux",
      "name": "Mobile-First UX & Sticky Action Architecture",
      "icon": "smartphone",
      "color": "emerald",
      "description": "Handheld control room optimization capturing over 70% of inbound local search traffic.",
      "items": [
        {
          "id": "mob-sticky-bar",
          "title": "Persistent Mobile Sticky Dual-Action Bar (< 768px)",
          "priority": "CRITICAL",
          "tags": [
            "Mobile",
            "CRO"
          ],
          "summary": "Lock a persistent high-contrast dual-action bar at the bottom of the viewport on screens under 768px.",
          "details": "Provides 50% Click-to-Call dialing and 50% Jump-to-Survey trigger, putting conversion targets right at thumb level.",
          "code_snippet": "<aside class=\"md:hidden fixed bottom-0 left-0 right-0 z-50 bg-zinc-950/95 backdrop-blur-md border-t border-zinc-800 p-3 pb-[calc(0.75rem+env(safe-area-inset-bottom))]\">\n  <div class=\"grid grid-cols-2 gap-2\">\n    <a href=\"tel:18005550199\" class=\"btn-call\">Call Now</a>\n    <a href=\"#survey\" class=\"btn-survey\">Free Quote</a>\n  </div>\n</aside>",
          "archetype": "universal"
        },
        {
          "id": "mob-safe-area",
          "title": "iOS Safe Area Inset Support (env(safe-area-inset-bottom))",
          "priority": "CRITICAL",
          "tags": [
            "Mobile",
            "CSS"
          ],
          "summary": "Apply env(safe-area-inset-bottom) to bottom padding on all sticky elements.",
          "details": "Without this rule, sticky action buttons collide directly with the physical iOS swipe bar, causing missed taps and frustration.",
          "code_snippet": "padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));",
          "archetype": "universal"
        },
        {
          "id": "mob-footer-padding",
          "title": "Footer Clearance Padding (pb-28)",
          "priority": "HIGH",
          "tags": [
            "Mobile",
            "CSS"
          ],
          "summary": "Ensure <footer> elements have generous bottom padding (pb-28 sm:pb-12) to clear sticky bars.",
          "details": "Prevents fixed bottom bars from visually covering copyright dates, contractor disclosures, and legal links on mobile viewports.",
          "code_snippet": "<footer class=\"pt-16 pb-28 sm:pb-16 bg-zinc-900 border-t border-zinc-800\">",
          "archetype": "universal"
        },
        {
          "id": "mob-bubble-dedupe",
          "title": "Floating Contact Bubble Deduplication",
          "priority": "HIGH",
          "tags": [
            "Mobile",
            "UX"
          ],
          "summary": "Strictly hide floating phone/WhatsApp bubbles on mobile when the bottom sticky bar is mounted.",
          "details": "Stacking floating phone bubbles over a persistent bottom call bar looks like spam and destroys brand credibility.",
          "code_snippet": "@media (max-width: 768px) {\n  .floating-contact-bubble { display: none !important; }\n}",
          "archetype": "universal"
        },
        {
          "id": "mob-above-fold-hero",
          "title": "Above-The-Fold Viewport Fit (min-h-[85dvh])",
          "priority": "HIGH",
          "tags": [
            "UX",
            "Layout"
          ],
          "summary": "Ensure headline, subtext, primary CTAs, and trust badges fit completely in initial viewport without scrolling.",
          "details": "Controlled top padding (pt-16 sm:pt-24) ensures mobile users immediately see the value proposition and core action trigger.",
          "code_snippet": "<section class=\"min-h-[85dvh] pt-16 sm:pt-24 pb-8 flex flex-col justify-center\">",
          "archetype": "universal"
        },
        {
          "id": "mob-touch-targets",
          "title": "WCAG AA Minimum Touch Targets (48x48px)",
          "priority": "HIGH",
          "tags": [
            "Accessibility",
            "Mobile"
          ],
          "summary": "Every button, tap card, and link target must meet minimum 48px height with 8px spacing.",
          "details": "Prevents accidental miss-clicks on mobile touchscreens and ensures full compliance with Google Page Experience guidelines.",
          "code_snippet": "min-height: 48px; min-width: 48px; margin: 4px;",
          "archetype": "universal"
        },
        {
          "id": "mob-map-scroll-guard",
          "title": "Mobile Map Scroll-Trap Guard (pointer-events: none)",
          "priority": "HIGH",
          "tags": [
            "Mobile",
            "UX"
          ],
          "summary": "Apply pointer-events: none to embedded map iframes until explicitly tapped; cap height to <= 280px.",
          "details": "Prevents mobile visitors from getting trapped inside the map viewport when attempting to scroll down the page.",
          "code_snippet": ".map-iframe { pointer-events: none; }\n.map-container.active .map-iframe { pointer-events: auto; }",
          "archetype": "universal"
        }
      ]
    },
    {
      "id": "visual-craft",
      "name": "Visual Design & Craft (Anti-Slop)",
      "icon": "palette",
      "color": "purple",
      "description": "Architectural polish and design standards that signal authority and premium craftsmanship.",
      "items": [
        {
          "id": "vis-no-emojis",
          "title": "Zero Raw Smartphone Emojis (Anti-Amateur Rule)",
          "priority": "CRITICAL",
          "tags": [
            "Design",
            "Branding"
          ],
          "summary": "Never use OS emojis in commercial markup; encapsulate all iconography into clean vector SVGs.",
          "details": "Raw emojis render as bright, multicolored smartphone icons that clash across operating systems and signal an amateur AI template.",
          "code_snippet": "<!-- Banned --> \ud83d\udcde (800) 555-0199\n<!-- Required --> <PhoneIcon class=\"w-4 h-4 text-amber-500 inline mr-2\" /> (800) 555-0199",
          "archetype": "universal"
        },
        {
          "id": "vis-photo-scrims",
          "title": "Protective Gradient Scrims Over Photography",
          "priority": "CRITICAL",
          "tags": [
            "Design",
            "Typography"
          ],
          "summary": "Always apply deep gradient scrim overlays behind white text placed over architectural photography.",
          "details": "White text placed over day-sky or light building backgrounds vanishes. Deep gradient scrims guarantee 100% WCAG AA contrast.",
          "code_snippet": "<div class=\"absolute inset-0 bg-gradient-to-t from-black/90 via-black/60 to-transparent\"></div>",
          "archetype": "universal"
        },
        {
          "id": "vis-typography-caps",
          "title": "Typography Scale Caps on Image Showcases",
          "priority": "HIGH",
          "tags": [
            "Design",
            "Typography"
          ],
          "summary": "Cap showcase title overlays at text-xl or text-2xl; never plaster massive text-5xl over photos.",
          "details": "In architectural and trade platforms, the photography is the hero, not the font. Oversized type chokes the image.",
          "code_snippet": "<h3 class=\"text-xl sm:text-2xl font-semibold text-white tracking-tight\">Custom Modern ADU</h3>",
          "archetype": "universal"
        },
        {
          "id": "vis-tactile-buttons",
          "title": "Micro-Tactile Button Depth vs. Toxic Neon Glows",
          "priority": "HIGH",
          "tags": [
            "Design",
            "CSS"
          ],
          "summary": "Replace blurry oversaturated glows with 1px inset highlights and soft ambient drop shadows.",
          "details": "Modern tactile depth uses a 1px top border highlight, soft ambient shadow, and active push transform (:active { transform: translateY(1px) scale(0.99); }).",
          "code_snippet": "box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 6px 20px rgba(245,158,11,0.25);\nborder: 1px solid rgba(255,255,255,0.15);",
          "archetype": "universal"
        },
        {
          "id": "vis-container-theme",
          "title": "Container-Scoped Themes (No Brute-Force CSS)",
          "priority": "CRITICAL",
          "tags": [
            "Design",
            "CSS"
          ],
          "summary": "Avoid wildcard CSS rules like html.light .text-white { color: #000 !important; }.",
          "details": "Wildcard overrides turn white text inside dark hero banners, process cards, and footers dark, rendering text 100% invisible.",
          "code_snippet": "/* Scope themes strictly to container wrappers or lock the page to a single luxury dark theme */",
          "archetype": "universal"
        },
        {
          "id": "vis-light-outdoor",
          "title": "Light-Mode First for Outdoor Crafts & Trades",
          "priority": "MEDIUM",
          "tags": [
            "Design",
            "Branding"
          ],
          "summary": "Outdoor trades (masonry, roofing, landscaping) must be designed light-mode first (limestone paper, architectural slate).",
          "details": "Allowing system dark-mode to cast outdoor trade sites into dark charcoal caves makes them look like crypto terminal apps rather than real contractors.",
          "code_snippet": "bg-[#FBFBFA] text-slate-900 border-slate-200",
          "archetype": "universal"
        }
      ]
    },
    {
      "id": "technical-seo",
      "name": "Technical SEO & 2026 Core Web Vitals",
      "icon": "search",
      "color": "cyan",
      "description": "Zero-defect crawlability, Google Search Essentials compliance, and AEO/GEO citability.",
      "items": [
        {
          "id": "seo-cwv-thresholds",
          "title": "Core Web Vitals Thresholds (LCP <= 2.5s, INP <= 200ms, CLS <= 0.1)",
          "priority": "CRITICAL",
          "tags": [
            "Core Web Vitals",
            "Performance"
          ],
          "summary": "Pass Google Core Web Vitals field data at the 75th percentile (LCP <= 2.5s, INP <= 200ms, CLS <= 0.1).",
          "details": "INP permanently replaced FID in 2024. Optimize LCP with preloaded WebP hero assets and eliminate main-thread blocking JS.",
          "code_snippet": "<link rel=\"preload\" as=\"image\" href=\"/images/hero.webp\" fetchpriority=\"high\" type=\"image/webp\" />",
          "archetype": "universal"
        },
        {
          "id": "seo-html-budget",
          "title": "HTML Size Budget (< 2MB Payload)",
          "priority": "HIGH",
          "tags": [
            "Technical SEO",
            "Performance"
          ],
          "summary": "Keep initial HTML payload under 2MB; ban oversized inline base64 images and stylesheets.",
          "details": "Googlebot fetches only the first 2MB of raw HTML. Bloated base64 tags push critical content and JSON-LD schemas out of indexation.",
          "code_snippet": "// Check HTML file size: gzip size < 100KB, uncompressed < 2MB",
          "archetype": "universal"
        },
        {
          "id": "seo-single-h1",
          "title": "Single H1 Tag Rule with Clean Typography",
          "priority": "CRITICAL",
          "tags": [
            "On-Page SEO"
          ],
          "summary": "Strictly enforce 1 single H1 tag per page; ban orphaned punctuation in headline typography.",
          "details": "Avoid stuffing colon entities into H1 tags that wrap awkwardly on mobile viewports. Place geo-entities into notification pills or eyebrows.",
          "code_snippet": "<!-- Good -->\n<span class=\"badge\">Orange County ADU Specialists</span>\n<h1>Custom Stick-Built ADU Builders</h1>",
          "archetype": "universal"
        },
        {
          "id": "seo-meta-bounds",
          "title": "Strict Title & Meta Description Boundaries",
          "priority": "HIGH",
          "tags": [
            "On-Page SEO"
          ],
          "summary": "Titles strictly 45-60 characters; Meta descriptions strictly 135-160 characters with CTA and phone.",
          "details": "Prevents truncation in Google SERPs and maximizes organic click-through rates.",
          "code_snippet": "title: \"Orange County ADU Builders | ADU Alliance\" (42 chars)\ndescription: \"Custom detached ADUs & garage conversions in Orange County. 100% city permit approval. Call (657) 298-4061 for a free property assessment.\" (148 chars)",
          "archetype": "universal"
        },
        {
          "id": "seo-absolute-canonicals",
          "title": "Absolute HTTPS Canonicals & OpenGraph Images",
          "priority": "CRITICAL",
          "tags": [
            "Technical SEO"
          ],
          "summary": "Canonical tags and og:image URLs must always use absolute HTTPS production origins.",
          "details": "Relative canonicals or localhost paths break social sharing cards and create indexing split loops.",
          "code_snippet": "<link rel=\"canonical\" href=\"https://adualliance.com/services/custom-adu/\" />\n<meta property=\"og:image\" content=\"https://adualliance.com/images/og-main.jpg\" />",
          "archetype": "universal"
        },
        {
          "id": "seo-llms-txt",
          "title": "AI Search Engine Index (/llms.txt & /llms-full.txt)",
          "priority": "HIGH",
          "tags": [
            "AEO / GEO",
            "2026 SEO"
          ],
          "summary": "Deploy clean Markdown summaries at the domain root documenting brand entities, service scopes, and routes.",
          "details": "Provides a clean, crawlable markdown index for Perplexity, ChatGPT Search, Claude, and Gemini research agents.",
          "code_snippet": "# Brand Name\n> One-sentence authoritative positioning.\n\n## Core Services\n- [Service 1](https://domain.com/services/s1/): Scope summary\n- [Location Hub](https://domain.com/locations/city/): Local coverage",
          "archetype": "universal"
        },
        {
          "id": "seo-ai-crawlers",
          "title": "AI Crawler Authorization in robots.txt",
          "priority": "HIGH",
          "tags": [
            "AEO / GEO",
            "Crawlability"
          ],
          "summary": "Explicitly allow GPTBot, PerplexityBot, ClaudeBot, Googlebot, and Bingbot.",
          "details": "Ensures your business entity can be quoted in AI Overviews and answer engine summaries.",
          "code_snippet": "User-agent: *\nAllow: /\n\nUser-agent: GPTBot\nAllow: /\n\nUser-agent: PerplexityBot\nAllow: /\n\nSitemap: https://domain.com/sitemap.xml",
          "archetype": "universal"
        }
      ]
    },
    {
      "id": "schema-markup",
      "name": "Schema.org Structured Data (Entity Graph)",
      "icon": "database",
      "color": "indigo",
      "description": "Rich snippet eligibility and Knowledge Graph entity binding without fatal Search Console errors.",
      "items": [
        {
          "id": "sch-no-self-serving",
          "title": "Zero Self-Serving Reviews on LocalBusiness (Fix <parent_node>)",
          "priority": "CRITICAL",
          "tags": [
            "Schema",
            "Compliance"
          ],
          "summary": "Never place aggregateRating on LocalBusiness or Organization on your own site.",
          "details": "Google strictly disallows self-serving reviews since Sep 2019. Doing so triggers fatal Search Console Rich Result errors: Invalid object type for field '<parent_node>'.",
          "code_snippet": "// Remove aggregateRating from LocalBusiness / CleaningService / Contractor schema.",
          "archetype": "universal"
        },
        {
          "id": "sch-explicit-type",
          "title": "Explicit @type on Graph Reference Nodes",
          "priority": "CRITICAL",
          "tags": [
            "Schema",
            "Syntax"
          ],
          "summary": "Never pass anonymous reference objects with only @id in Schema.org @graph arrays.",
          "details": "Google's rich result parser cannot resolve the object type of untyped references and throws parent node errors. Always declare @type alongside @id.",
          "code_snippet": "// Good\n\"publisher\": { \"@type\": \"Organization\", \"@id\": \"https://domain.com/#organization\" }\n// Bad (Throws Error)\n\"publisher\": { \"@id\": \"https://domain.com/#organization\" }",
          "archetype": "universal"
        },
        {
          "id": "sch-hasmap",
          "title": "Google Maps Entity Grounding via hasMap",
          "priority": "HIGH",
          "tags": [
            "Local Schema"
          ],
          "summary": "Inject the Google Maps search URL into the hasMap attribute of LocalBusiness schemas.",
          "details": "Binds your digital web document directly to Google's physical Knowledge Graph geographic entity.",
          "code_snippet": "\"hasMap\": \"https://maps.google.com/maps?q=City+State+Zip\"",
          "archetype": "universal"
        },
        {
          "id": "sch-unified-graph",
          "title": "Unified Homepage @graph Connectivity",
          "priority": "HIGH",
          "tags": [
            "Schema",
            "Knowledge Graph"
          ],
          "summary": "Bundle WebSite, WebPage, and LocalBusiness in a single @graph array connected via @id node anchors.",
          "details": "Provides 100/100 semantic graph connectivity for search engines without fragmented scripts.",
          "code_snippet": "{\n  \"@context\": \"https://schema.org\",\n  \"@graph\": [\n    { \"@type\": \"WebSite\", \"@id\": \"...#website\" },\n    { \"@type\": \"WebPage\", \"@id\": \"...#webpage\" },\n    { \"@type\": \"HomeAndConstructionBusiness\", \"@id\": \"...#organization\" }\n  ]\n}",
          "archetype": "universal"
        },
        {
          "id": "sch-service-offers",
          "title": "Service Typing in hasOfferCatalog (Not Product Offer)",
          "priority": "HIGH",
          "tags": [
            "Schema"
          ],
          "summary": "Use @type: 'Service' inside service catalogs; avoid standalone e-commerce @type: 'Offer'.",
          "details": "Google Merchant Listings parser interprets standalone Offer as physical e-commerce goods, throwing errors on local contractor sites.",
          "code_snippet": "{\n  \"@type\": \"OfferCatalog\",\n  \"itemListElement\": [\n    {\n      \"@type\": \"Offer\",\n      \"itemOffered\": { \"@type\": \"Service\", \"name\": \"...\" }\n    }\n  ]\n}",
          "archetype": "universal"
        }
      ]
    },
    {
      "id": "programmatic-seo",
      "name": "Programmatic Local SEO & Anti-Doorway Strategy",
      "icon": "map-pin",
      "color": "teal",
      "description": "Multi-location expansion models protected against Google's helpful content doorway penalties.",
      "items": [
        {
          "id": "prog-4tier",
          "title": "4-Tier Programmatic City Routing Architecture",
          "priority": "CRITICAL",
          "tags": [
            "Programmatic SEO",
            "Information Architecture"
          ],
          "summary": "Tier A (Metros >=50k): Bespoke hub; Tier B (10k-50k): Full matrix; Tier C (2k-10k): Hub+2 services; Tier D (<2k): Hub only.",
          "details": "Prevents thin-page bloat across large location networks (e.g. 500+ cities). Prune Tier D subservices with 301 redirects to hub.",
          "code_snippet": "// Georgia Demolition / SC Tree Removal 4-Tier Model:\nTier A: Bespoke landing page + custom case studies\nTier B: City Hub + 14 specialized service subpages\nTier C: City Hub + Top 3 core pillar pages\nTier D: Single regional umbrella hub",
          "archetype": "high-ticket"
        },
        {
          "id": "prog-anti-doorway",
          "title": "Enforce < 50% Pairwise Shingle Similarity",
          "priority": "CRITICAL",
          "tags": [
            "Anti-Spam",
            "Content"
          ],
          "summary": "Main content pairwise 3-gram Jaccard overlap across municipal pages must remain strictly under 50%.",
          "details": "City-name-swapped boilerplate triggers Google's doorway classifiers. Inject local micro-districts, soil profiles, and permit timelines.",
          "code_snippet": "python scripts/doorway_uniqueness_checker.py dist/locations/",
          "archetype": "high-ticket"
        },
        {
          "id": "prog-triangular-mesh",
          "title": "Triangular Reciprocal Internal Linking (Zero Orphans)",
          "priority": "CRITICAL",
          "tags": [
            "Internal Linking"
          ],
          "summary": "Parent City Hub links down to all service children; children link up to parent and across to sibling services and neighbors.",
          "details": "Generating child routes without parent links creates 100% orphaned, unindexable pages. Every URL must be within 3 clicks of home.",
          "code_snippet": "1. Upwards: Breadcrumb back to /locations/[city]/\n2. Downwards: Parent hub loops over services with crawlable <a href>\n3. Lateral: Sibling services in same city\n4. Geographic: Same service in adjacent municipalities",
          "archetype": "high-ticket"
        },
        {
          "id": "prog-aeo-box",
          "title": "AEO / GEO Direct Answer Passage (45-60 Words)",
          "priority": "HIGH",
          "tags": [
            "AEO / GEO"
          ],
          "summary": "Place a 45-60 word quotable Direct Answer Box at the top of each programmatic landing page.",
          "details": "Targets Google AI Overviews and Perplexity extraction answering average local cost, turnaround time, and permit regulations.",
          "code_snippet": "<div class=\"p-4 bg-zinc-900 border border-zinc-800 rounded-xl mb-8\">\n  <h4 class=\"font-medium text-amber-500\">Direct Overview: Demolition in [City]</h4>\n  <p class=\"text-sm text-zinc-300\">Full teardowns in [City] average $8,000\u2013$25,000 ($4\u2013$15/sq ft). County permits take 5\u201310 business days...</p>\n</div>",
          "archetype": "high-ticket"
        },
        {
          "id": "prog-physical-grounding",
          "title": "Grounding in Concrete Physical Realities",
          "priority": "HIGH",
          "tags": [
            "Local SEO",
            "Content"
          ],
          "summary": "Never write generic town news; address trade-specific physical realities (water hardness, soil types, parking, building permits).",
          "details": "Generic municipal news dilutes topical relevance. Ground copy in local building codes, soil excavation conditions, or narrow street access.",
          "code_snippet": "Address local red-clay excavation, HOA architectural reviews, or copropri\u00e9t\u00e9 quiet hours.",
          "archetype": "high-ticket"
        }
      ]
    },
    {
      "id": "tracking-analytics",
      "name": "Tracking, Telemetry & GA4/GTM Plumbing",
      "icon": "bar-chart-2",
      "color": "pink",
      "description": "Closed-loop data capture across phone calls, CRM iframe events, and thank-you conversions.",
      "items": [
        {
          "id": "trk-gtm-container",
          "title": "Google Tag Manager Baseline Setup",
          "priority": "CRITICAL",
          "tags": [
            "Analytics",
            "GTM"
          ],
          "summary": "Install Google Tag Manager container firing GA4 Measurement ID across All Pages.",
          "details": "Provides a clean telemetry abstraction layer for firing conversion pixels (Google Ads, Meta, TikTok) without touching code.",
          "code_snippet": "<!-- GTM snippet in <head> and <body> -->",
          "archetype": "universal"
        },
        {
          "id": "trk-call-listener",
          "title": "Click-to-Call Telemetry Listener",
          "priority": "CRITICAL",
          "tags": [
            "Conversions",
            "Telemetry"
          ],
          "summary": "Attach global event listener to all a[href^=\"tel:\"] links pushing phone_call_click to dataLayer.",
          "details": "Phone calls represent 60%+ of emergency contractor revenue; tracking call clicks is essential for ROAS optimization.",
          "code_snippet": "document.querySelectorAll('a[href^=\"tel:\"]').forEach(el => {\n  el.addEventListener('click', () => {\n    window.dataLayer = window.dataLayer || [];\n    window.dataLayer.push({\n      event: 'phone_call_click',\n      phone_number: el.getAttribute('href').replace('tel:', '')\n    });\n  });\n});",
          "archetype": "universal"
        },
        {
          "id": "trk-ghl-postmessage",
          "title": "CRM Iframe PostMessage Conversion Interception",
          "priority": "CRITICAL",
          "tags": [
            "Conversions",
            "CRM"
          ],
          "summary": "Listen for cross-origin postMessage events from GoHighLevel or CRM iframes to fire lead_form_submitted.",
          "details": "External iframes cannot run parent scripts. Intercepting the submit postMessage bridges the gap into Google Ads conversion tracking.",
          "code_snippet": "window.addEventListener('message', (e) => {\n  if (e.data?.action === 'form-submitted' || e.data?.survey_submitted || e.data?.type === 'hsFormCallback') {\n    window.dataLayer = window.dataLayer || [];\n    window.dataLayer.push({ event: 'lead_form_submitted' });\n  }\n});",
          "archetype": "universal"
        },
        {
          "id": "trk-thankyou-route",
          "title": "Dedicated Post-Submission Route (/thank-you)",
          "priority": "HIGH",
          "tags": [
            "CRO",
            "Conversions"
          ],
          "summary": "Redirect leads to /thank-you firing GA4 generate_lead with an emergency callback SLA roadmap.",
          "details": "Gives the customer immediate next steps (who will call them and when) and provides an ironclad URL-destination conversion goal.",
          "code_snippet": "/thank-you route: fires gtag('event', 'generate_lead') + shows 3-step 15-minute callback roadmap.",
          "archetype": "universal"
        }
      ]
    },
    {
      "id": "legal-compliance",
      "name": "Legal Compliance, Security & Disclosures",
      "icon": "shield",
      "color": "rose",
      "description": "Liability shielding for contractor referral networks, FTC rules, and edge security headers.",
      "items": [
        {
          "id": "leg-contractor-network",
          "title": "Contractor Network & Referral Model Disclosure",
          "priority": "CRITICAL",
          "tags": [
            "Legal",
            "FTC Compliance"
          ],
          "summary": "Position platform strictly as an Alliance connecting owners with licensed independent builders; never borrow unowned licenses.",
          "details": "Claiming the lead agency itself is the licensed builder violates licensing laws (e.g. California CSLB B&P Code 7027.1). State that all formal contracts are between owner and licensed partner.",
          "code_snippet": "<p class=\"text-xs text-slate-400\">\n  [Brand] connects property owners with licensed, independent general contractors. All construction agreements and permits are executed directly with licensed partners.\n</p>",
          "archetype": "high-ticket"
        },
        {
          "id": "leg-tcpa-consent",
          "title": "TCPA & Privacy Communications Consent",
          "priority": "CRITICAL",
          "tags": [
            "Legal",
            "Compliance"
          ],
          "summary": "Include explicit consent disclosure for phone calls, SMS text messages, and email prior to submission.",
          "details": "Protects against TCPA robocall statutory fines. Enforce consent checkbox or clear submission disclaimer.",
          "code_snippet": "By clicking 'Get Free Assessment', you authorize [Brand] and its contractor network to contact you via telephone, email, and SMS.",
          "archetype": "universal"
        },
        {
          "id": "leg-unbundled-consent",
          "title": "Unbundled Marketing vs. Service Consent",
          "priority": "HIGH",
          "tags": [
            "GDPR / CCPA",
            "Compliance"
          ],
          "summary": "Keep service quote callback consent mandatory, but keep marketing newsletter consent strictly optional and unchecked.",
          "details": "Satisfies GDPR and European consumer laws, preventing compliance flags on international or state audits.",
          "code_snippet": "<input type=\"checkbox\" required id=\"consent-service\"> I agree to be contacted regarding my quote request.\n<input type=\"checkbox\" id=\"consent-marketing\"> (Optional) Receive seasonal maintenance tips.",
          "archetype": "universal"
        },
        {
          "id": "leg-edge-security-headers",
          "title": "Full Cloudflare Edge Security Headers (_headers)",
          "priority": "HIGH",
          "tags": [
            "Security",
            "Headers"
          ],
          "summary": "Enforce HSTS preload, X-Content-Type-Options, X-Frame-Options, and CSP in public/_headers.",
          "details": "Secures browser transport, prevents clickjacking, and satisfies high-security SEO audit scores (A+ on SSL Labs).",
          "code_snippet": "/*\n  Strict-Transport-Security: max-age=63072000; includeSubDomains; preload\n  X-Frame-Options: SAMEORIGIN\n  X-Content-Type-Options: nosniff\n  Referrer-Policy: origin-when-cross-origin",
          "archetype": "universal"
        }
      ]
    },
    {
      "id": "deadly-sins",
      "name": "The 10 Deadly Sins (What NOT To Do)",
      "icon": "alert-triangle",
      "color": "red",
      "description": "Critical anti-patterns that trigger Google penalties, legal fines, or conversion collapses.",
      "items": [
        {
          "id": "sin-fake-reviews",
          "title": "Fake or Unverified Review Schemas",
          "priority": "BANNED",
          "tags": [
            "Penalty Risk"
          ],
          "summary": "Never display fabricated Google ratings or aggregateRating schemas not backed by a live Google Business Profile.",
          "details": "Triggers FTC truth-in-advertising fines and fatal Google Search Console rich result disqualifications.",
          "archetype": "universal"
        },
        {
          "id": "sin-raw-emojis",
          "title": "Raw Smartphone Emojis in Commercial UI",
          "priority": "BANNED",
          "tags": [
            "Design Tell"
          ],
          "summary": "Never use OS emojis (\ud83d\udcde, \u2728, \ud83c\udfe0) in commercial or B2B platforms; use monochrome SVG vector icons.",
          "details": "Render as bright cartoon stickers that clash across OS platforms and signal a templated AI site.",
          "archetype": "universal"
        },
        {
          "id": "sin-image-hotlink",
          "title": "External Image Hotlinking",
          "priority": "BANNED",
          "tags": [
            "Liability"
          ],
          "summary": "Never hotlink images from competitor domains or staging servers; download locally to public/images/localized/.",
          "details": "Causes broken images, privacy audit flags, slow external DNS lookups, and copyright liability.",
          "archetype": "universal"
        },
        {
          "id": "sin-wildcard-theme",
          "title": "Wildcard Theme Inversion CSS",
          "priority": "BANNED",
          "tags": [
            "Bug Risk"
          ],
          "summary": "Never use html.light .text-white { color: #0F172A !important; }.",
          "details": "Inverts text inside dark image overlays and hero banners, turning copy 100% invisible.",
          "archetype": "universal"
        },
        {
          "id": "sin-long-static-forms",
          "title": "Static 8+ Field Contact Forms",
          "priority": "BANNED",
          "tags": [
            "CRO Disaster"
          ],
          "summary": "Never plaster long single-page static forms with 8+ input fields on commercial landing pages.",
          "details": "Kills conversion rates by 50%+ due to cognitive fatigue. Use 4-step progressive surveys.",
          "archetype": "universal"
        },
        {
          "id": "sin-doorway-boilerplate",
          "title": "City-Name Swapped Doorway Spams",
          "priority": "BANNED",
          "tags": [
            "Google Spam"
          ],
          "summary": "Never generate hundreds of city pages where only the city name is swapped in boilerplate copy.",
          "details": "Trips Google's Helpful Content doorway classifiers, destroying domain siteRadius and authority.",
          "archetype": "universal"
        },
        {
          "id": "sin-indexing-api-abuse",
          "title": "Google Indexing API Abuse on Local Sites",
          "priority": "BANNED",
          "tags": [
            "Spam Penalty"
          ],
          "summary": "Never force-submit general commercial local landing pages via the Google Indexing API.",
          "details": "Indexing API is strictly for JobPosting and VideoObject livestreams; commercial pinging triggers automated spam penalties.",
          "archetype": "universal"
        },
        {
          "id": "sin-microscopic-fonts",
          "title": "Microscopic Fonts (< 12px) in Footers",
          "priority": "BANNED",
          "tags": [
            "Accessibility"
          ],
          "summary": "Never use text-[9px] or text-[10px] for contractor disclosures or data tags.",
          "details": "Fails WCAG AA minimum readability standards and makes essential disclosures unreadable on mobile.",
          "archetype": "universal"
        },
        {
          "id": "sin-back-button-hijack",
          "title": "Back-Button Hijacking Scripts",
          "priority": "BANNED",
          "tags": [
            "Google Spam Policy"
          ],
          "summary": "Never defeat the browser back button using history.pushState or popup redirects.",
          "details": "Enforced in Google Spam Policies since June 2026: triggers immediate algorithmic demotions.",
          "archetype": "universal"
        },
        {
          "id": "sin-sitemap-worker-timeout",
          "title": "Edge Worker Dynamic Sitemap Timeouts",
          "priority": "BANNED",
          "tags": [
            "Technical SEO"
          ],
          "summary": "Never perform unbatched external CMS REST calls inside edge sitemap generators.",
          "details": "Edge workers timeout silently at 10s, truncating sitemap.xml and dropping hundreds of city routes.",
          "archetype": "universal"
        }
      ]
    },
    {
      "id": "verification-gate",
      "name": "Pre-Launch Verification Gate (Zero Hallucinated Success)",
      "icon": "check-circle",
      "color": "emerald",
      "description": "Automated zero-dependency terminal tests that must pass 100% before launch.",
      "items": [
        {
          "id": "ver-compilation",
          "title": "Clean Production Build Compilation",
          "priority": "CRITICAL",
          "tags": [
            "CI/CD",
            "Verification"
          ],
          "summary": "Assert npm run build exits with code 0, 0 TypeScript errors, and valid dist/ artifacts.",
          "details": "Never declare a site complete without compiling the full static export locally.",
          "code_snippet": "npm run build && test -d dist",
          "archetype": "universal"
        },
        {
          "id": "ver-token-scan",
          "title": "Zero Leaked Token & Placeholder Scan",
          "priority": "CRITICAL",
          "tags": [
            "QA",
            "Verification"
          ],
          "summary": "Recursively scan compiled HTML/JSX for unexpanded template placeholders ([LOCATION], {{...}}).",
          "details": "Catches template dictionary omissions before raw brackets leak into public Google indexing.",
          "code_snippet": "! grep -rnE \"\\[(LOCATION|PHONE|CTA:[a-z]+)\\]|\\{\\{.*\\}\\}\" dist/",
          "archetype": "universal"
        },
        {
          "id": "ver-nap-consistency",
          "title": "Universal NAP & Phone Number Consistency",
          "priority": "CRITICAL",
          "tags": [
            "Local SEO",
            "QA"
          ],
          "summary": "Assert all tel: links use raw digits (tel:8886434199) and display strings are uniform US/local format.",
          "details": "Eradicates old staging numbers or inconsistent telephone links across headers, footers, and FAQs.",
          "code_snippet": "python scripts/nap_consistency_scanner.py",
          "archetype": "universal"
        },
        {
          "id": "ver-link-mesh",
          "title": "Link Mesh & Zero Orphan Verification",
          "priority": "HIGH",
          "tags": [
            "Technical SEO",
            "Crawl"
          ],
          "summary": "Verify 100% of sitemap URLs are reachable within 3 internal clicks from the homepage.",
          "details": "Guarantees full PageRank flow and indexation parity with zero isolated programmatic islands.",
          "code_snippet": "python scripts/orphan_link_auditor.py",
          "archetype": "universal"
        },
        {
          "id": "ver-schema-validation",
          "title": "Schema.org Syntax & Parent Node Audit",
          "priority": "CRITICAL",
          "tags": [
            "Schema",
            "QA"
          ],
          "summary": "Validate generated JSON-LD across all pages for 0 warnings and 0 <parent_node> errors.",
          "details": "Guarantees rich result eligibility and prevents manual structured data actions in Search Console.",
          "code_snippet": "python scripts/schema_validator.py dist/",
          "archetype": "universal"
        }
      ]
    }
  ],
  "decision_engines": {
    "forms_vs_surveys": {
      "title": "Form vs. Survey Decision Matrix",
      "scenarios": [
        {
          "archetype": "High-Ticket Lead Gen & Custom Quotes (ADU, Renovation, Commercial)",
          "recommended": "4-Step Interactive Card Survey",
          "reasoning": "High-ticket jobs require qualification (property type, square meters, timeline). Multi-step card surveys reduce cognitive fatigue and filter low-intent tire kickers while increasing completed lead quality.",
          "rules": [
            "Slides 1-3 auto-advance on radio tap (300ms)",
            "Address and contact details on final step",
            "Transparent iframe styling with skeleton loader"
          ]
        },
        {
          "archetype": "Emergency & Urgent Dispatch (Tree on house/car, Water leaks, Locksmith, Towing)",
          "recommended": "One-Tap Call Dialer + Ultra-Short 1-2 Field Form",
          "reasoning": "Customers in distress experience acute anxiety. A 4-step survey will cause immediate bounce. Priority #1 is direct telephone click-to-call, backed by a simple 2-field form (Phone Number + Address).",
          "rules": [
            "Never ask for email in emergency flows (pure friction)",
            "Prominent 24/7 emergency phone button",
            "Instant dispatch SLA visible above fold"
          ]
        },
        {
          "archetype": "B2B, Agency Consultations & SaaS Demos",
          "recommended": "2-3 Field Work Email Form OR Direct Calendly Embed",
          "reasoning": "B2B buyers prefer direct scheduling. Collect Name, Work Email, Company Name, and route directly to calendar booking or sales team.",
          "rules": [
            "Validate corporate/work email domains",
            "Optionally offer Calendly inline after initial email",
            "Clear 24h SLA callback promise"
          ]
        },
        {
          "archetype": "Local SMB / Brick-and-Mortar Inquiries",
          "recommended": "Clean 3-Field Contact Form",
          "reasoning": "Simple customer inquiries (e.g. store hours, general questions) expect a standard Name, Phone/Email, Message form. Complex surveys feel unnatural.",
          "rules": [
            "Labels above inputs",
            "Inline validation",
            "Visible business hours & location map alongside form"
          ]
        },
        {
          "archetype": "Lead Magnet & Gated Content (PDF Guides, Calculators)",
          "recommended": "1-Field Single Input (Email Only)",
          "reasoning": "Value-to-effort parity. Asking 5 questions for a PDF download drops conversion by 70%. Collect email first, then offer optional progressive profiling.",
          "rules": [
            "Autofocus input on desktop",
            "Instant delivery on thank-you page",
            "Zero spam reassurance microcopy"
          ]
        }
      ]
    },
    "tech_stack_selector": {
      "title": "Tech Stack Decision Matrix",
      "scenarios": [
        {
          "stack": "Astro SSG + Cloudflare Pages",
          "best_for": "Programmatic Local SEO (100\u20135,000+ pages), Multi-Location Platforms, Content Platforms",
          "pros": [
            "0kb client JS by default",
            "Sub-50ms TTFB worldwide",
            "Zero runtime crashes",
            "Builds 5,000 pages in under 90s"
          ],
          "watch_outs": [
            "Requires static route mapping (getStaticPaths)",
            "Dynamic user logins require SSR adapter"
          ]
        },
        {
          "stack": "Next.js App Router (SSR/ISR) + Vercel / Cloudflare",
          "best_for": "Complex Web Applications, User Dashboards, Real-Time Calculations, Headless CMS with frequent updates",
          "pros": [
            "Rich React ecosystem",
            "Server Actions",
            "Flexible ISR/SSR caching",
            "Headless CMS REST/GraphQL parity"
          ],
          "watch_outs": [
            "Next.js 2MB cache limit on big REST fetches",
            "Watch edge worker build timeouts on sitemaps",
            "Node server maintenance if self-hosted"
          ]
        },
        {
          "stack": "Vite + React Router / SPA",
          "best_for": "Interactive client-side calculators, SaaS portals, lightweight admin tools",
          "pros": [
            "Lightning-fast local HMR",
            "Tiny bundle size",
            "Simple state management"
          ],
          "watch_outs": [
            "SEO crawlers require SSR/Prerendering if ranking is needed"
          ]
        },
        {
          "stack": "Clean Static HTML / Tailwind / Alpine.js",
          "best_for": "Single-page landing pages, micro-sites, emergency squeeze funnels",
          "pros": [
            "Zero dependencies",
            "Deploys anywhere in 2 seconds",
            "100/100 Lighthouse out of the box"
          ],
          "watch_outs": [
            "Manual code duplication if scaling to 20+ pages"
          ]
        },
        {
          "stack": "WordPress / Webflow / Shopify",
          "best_for": "When non-technical client teams require daily visual drag-and-drop or ecommerce cart management",
          "pros": [
            "Client independence",
            "Rich plugin ecosystems",
            "Native blogging"
          ],
          "watch_outs": [
            "Plugin bloat can ruin Core Web Vitals",
            "Security patches required for WordPress"
          ]
        }
      ]
    }
  }
}