Your Vibe-Coded Site Is Indexed. Answer Engines Still Won't Quote It. I Wrote an AEO Checker.
This week on X, the vibe-coding argument is still mostly about whether a demo is a product. A quieter failure showed up in a different form. Kin Lane noted that Replit and Lovable both serve A2A agent cards from their do
This week on X, the vibe-coding argument is still mostly about whether a demo is a product. A quieter failure showed up in a different form. Kin Lane noted that Replit and Lovable both serve A2A agent cards from their docs sites, each with one skill whose description stops mid-sentence. Vercel, he wrote, went another way: a documented MCP server and an llms.txt.
That is a small, specific kind of slop: a machine-readable file that looks finished and then just⦠ends. Marketing sites pick up the same habit. A coding agent will prerender the HTML, add a title, even drop JSON-LD into the <head>, and the page will look indexed and complete in your browser. An answer engine still has nothing it can safely lift.
So I wrote the kind of site a coding agent produces for "a letterpress stationery studio in Providence with hours, an address, and a page about how long a custom suite takes." The HTML is prerendered on purpose. There is a real title, a real H1, an FAQ accordion, and three JSON-LD blocks β this is not an empty #root. Then I left in the mistakes I keep seeing on vibe-coded marketing sites: a process page that never names the question, an answer buried under a studio story, review markup for reviews that are not on the page, FAQ schema for questions the accordion does not ask, a byline and a date that exist only inside the JSON, a homepage business name that does not match the sign on the door, and an llms.txt that links to a missing About page and cuts off mid-sentence.
Then I wrote a short checker, aeo_check.py, that reads the local tree and reports whether that page is ready to be quoted as the answer. I ran it on the site as the agent handed it over, on the same tree after I only corrected the homepage JSON-LD name, and on a version that answers the question in the first paragraph, with schema that matches the visible page. All the numbers below come from those three runs.
The fixture
The business is fictional. It is called Pell & Press Stationers, and it prints custom letterpress wedding stationery at 41 North Main Street in Providence, Rhode Island. The question I want one page to answer is "How long does custom letterpress wedding stationery take?"
The "before" tree looks finished. The homepage has hours, an address, and LocalBusiness markup. The process page has an FAQ accordion and two JSON-LD blocks. The part that fails an AEO audit is not the missing <title>. It is that the title and H1 never ask the question, the six-to-eight-week answer is under a heading called "Later, the part people actually ask," and the structured data describes a different page than the one you can read.
Here is the head of that process page, trimmed to the part that matters. The host is fake and will not resolve.
<title>Our Process | Pell & Press Stationers</title>
<script type="application/ld+json">
{
"@type": "Article",
"headline": "Our Process",
"dateModified": "2024-03-12",
"author": {"@type": "Person", "name": "Mara Pell"},
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "4.9",
"reviewCount": "128"
}
}
</script>
If you open the page in a browser, it looks like a studio with a process. If you read the first 90 words, you get ink, cotton paper, and New England couples. The 128 reviews and the 4.9 rating live only in the JSON. The FAQ schema asks about price and foil stamping; the visible accordion does not. The author exists in the schema and nowhere on the page. The schema date is March 12, 2024; there is no visible date at all. The homepage JSON-LD name is "Pell and Press," which is not the same as "Pell & Press Stationers." And the llms.txt ends like this:
- [About](/about): The studio story and
There is no /about in the tree. The sentence just stops.
The checker
aeo_check.py reads a local directory: HTML, llms.txt, and a few sibling files. It does not fetch URLs, does not log in to a builder, and does not publish anything. You pass --question and --page for the URL you want an answer engine to quote, plus --business-name and --answer-terms so the checker can tell a buried answer from an invented one.
It reports:
- a title and H1 that reuse fewer than 60 percent of the significant words in the question
- a first 90 words (from
<article>or<main>, if present) that contain none of the answer phrases you passed - JSON-LD that does not parse, or an answer page with no usable JSON-LD
-
RevieworAggregateRatingmarkup when the visible page does not show matching review text -
FAQPagequestions that do not appear in the visible text - an Organization or LocalBusiness name that does not match
--business-nameafter normalizing&andand - a missing visible author or byline on the answer page
- a missing visible published or updated date, or a schema date that does not match one
- an
llms.txtthat links to a path which is not in the tree, or a description line that ends mid-sentence - a missing
llms.txt, as a warning only. A missing file is optional. A file that lies is a fail.
It does not fetch the live site, does not query Google or ChatGPT, and does not claim the page will be cited. A clean run means the local files for this question are quotable. Whether an engine actually quotes them is a different job β that is what an AI visibility audit measures, from the outside.
aeo_check.py (about 1,210 lines, 17 tests)#!/usr/bin/env python3
"""aeo_check.py β local AEO-readiness checker for a marketing-site tree.
Reads files already on disk. It does not fetch URLs, does not log in to a
builder, and does not publish anything. Run it on a tree you own.
Pass --question and --page for the URL you want an answer engine to quote,
plus --business-name and --answer-terms so the checker can tell a buried
answer from an invented one.
"""
from __future__ import annotations
import argparse
import html as htmlmod
import json
import os
import re
import sys
import unittest
from dataclasses import dataclass, field
from datetime import date
from pathlib import Path
from typing import Any
from urllib.parse import unquote, urlparse
SKIP_DIRS = {
".git",
"node_modules",
"dist",
"build",
"out",
"coverage",
"target",
".next",
".cache",
".venv",
"venv",
"__pycache__",
"vendor",
}
SCAN_SUFFIXES = {".html", ".htm", ".txt", ".md", ".xml", ".json"}
STOPWORDS = {
"a",
"an",
"the",
"of",
"for",
"to",
"in",
"on",
"and",
"or",
"does",
"do",
"is",
"are",
"was",
"were",
"be",
"what",
"when",
"where",
"who",
"why",
"how",
"your",
"my",
"our",
"its",
"from",
"with",
"about",
"into",
"than",
"that",
"this",
"it",
"as",
"at",
"by",
}
MONTHS = {
"january": 1,
"february": 2,
"march": 3,
"april": 4,
"may": 5,
"june": 6,
"july": 7,
"august": 8,
"september": 9,
"october": 10,
"november": 11,
"december": 12,
"jan": 1,
"feb": 2,
"mar": 3,
"apr": 4,
"jun": 6,
"jul": 7,
"aug": 8,
"sep": 9,
"sept": 9,
"oct": 10,
"nov": 11,
"dec": 12,
}
TITLE_RE = re.compile(r"<title[^>]*>(.*?)</title>", re.I | re.S)
H1_RE = re.compile(r"<h1[^>]*>(.*?)</h1>", re.I | re.S)
MAIN_RE = re.compile(r"<main[^>]*>(.*?)</main>", re.I | re.S)
ARTICLE_RE = re.compile(r"<article[^>]*>(.*?)</article>", re.I | re.S)
JSONLD_RE = re.compile(
r'<script[^>]*type=["\']application/ld\+json["\'][^>]*>(.*?)</script>',
re.I | re.S,
)
TAG_RE = re.compile(r"<[^>]+>")
SCRIPT_STYLE_RE = re.compile(
r"<(script|style|noscript|svg)[^>]*>.*?</\1>",
re.I | re.S,
)
ISO_DATE_RE = re.compile(r"\b(20\d{2})-(\d{2})-(\d{2})\b")
TEXT_DATE_RE = re.compile(
r"\b(?:updated|published|posted|written)?\s*"
r"(?:"
r"([A-Za-z]{3,9})\.?\s+(\d{1,2})(?:st|nd|rd|th)?,?\s+(20\d{2})"
r"|"
r"(\d{1,2})(?:st|nd|rd|th)?\s+([A-Za-z]{3,9})\.?,?\s+(20\d{2})"
r"|"
r"([A-Za-z]{3,9})\.?\s+(20\d{2})"
r")\b",
re.I,
)
LLMS_LINK_RE = re.compile(r"\[([^\]]+)\]\(([^)]+)\)")
TRAILING_CUT_RE = re.compile(
r"(?i)(?:\b(?:and|or|the|a|an|to|for|of|with|in|on|by|as|at)\s*$)|[,;:ββ-]\s*$"
)
def iter_files(root: Path):
for dirpath, dirnames, filenames in os.walk(root):
dirnames[:] = [d for d in dirnames if d not in SKIP_DIRS and not d.startswith(".git")]
for name in filenames:
yield Path(dirpath) / name
def rel(root: Path, path: Path) -> str:
try:
return path.relative_to(root).as_posix()
except ValueError:
return str(path)
def strip_tags(chunk: str) -> str:
chunk = SCRIPT_STYLE_RE.sub(" ", chunk)
chunk = TAG_RE.sub(" ", chunk)
chunk = htmlmod.unescape(chunk)
return re.sub(r"\s+", " ", chunk).strip()
def visible_text(html: str) -> str:
return strip_tags(html)
def main_text(html: str) -> str:
for rx in (ARTICLE_RE, MAIN_RE):
m = rx.search(html)
if m:
text = strip_tags(m.group(1))
if text:
return text
return visible_text(html)
def first_title(html: str) -> str:
m = TITLE_RE.search(html)
return strip_tags(m.group(1)) if m else ""
def first_h1(html: str) -> str:
m = H1_RE.search(html)
return strip_tags(m.group(1)) if m else ""
def words(text: str) -> list[str]:
return re.findall(r"[A-Za-z0-9&']+", text.lower())
def significant_tokens(text: str) -> list[str]:
out = []
for w in words(text):
if w in STOPWORDS or len(w) < 3:
continue
out.append(w)
return out
def flatten_ld(data: Any):
if isinstance(data, list):
for item in data:
yield from flatten_ld(item)
elif isinstance(data, dict):
if "@graph" in data:
yield from flatten_ld(data["@graph"])
else:
yield data
def types_of(obj: dict) -> set[str]:
raw = obj.get("@type")
if raw is None:
return set()
if isinstance(raw, list):
return {str(x) for x in raw}
return {str(raw)}
def as_list(value: Any) -> list[Any]:
if value is None:
return []
if isinstance(value, list):
return value
return [value]
def text_of(value: Any) -> str:
if value is None:
return ""
if isinstance(value, str):
return value.strip()
if isinstance(value, dict):
for key in ("name", "text", "headline", "@value"):
if key in value and isinstance(value[key], str):
return value[key].strip()
return ""
return str(value).strip()
def iter_jsonld(html: str) -> list[dict]:
found: list[dict] = []
for m in JSONLD_RE.finditer(html):
raw = m.group(1).strip()
try:
data = json.loads(raw)
except json.JSONDecodeError:
found.append({"_invalid": True, "raw": raw})
continue
for obj in flatten_ld(data):
if isinstance(obj, dict):
found.append(obj)
return found
def norm_name(value: str) -> str:
value = value.lower().replace("&", " and ")
value = re.sub(r"[^a-z0-9]+", " ", value)
return " ".join(value.split())
def names_close(left: str, right: str) -> bool:
a, b = norm_name(left), norm_name(right)
if not a or not b:
return False
return a == b
def first_n_words(text: str, n: int) -> str:
ws = re.findall(r"\S+", text)
return " ".join(ws[:n])
def parse_iso_parts(year: str, month: str, day: str | None) -> date | tuple[int, int] | None:
try:
y, mo = int(year), int(month)
if day is None:
return (y, mo)
return date(y, mo, int(day))
except ValueError:
return None
def month_num(token: str) -> int | None:
return MONTHS.get(token.lower().rstrip("."))
def parse_visible_dates(text: str) -> list[date | tuple[int, int]]:
out: list[date | tuple[int, int]] = []
for m in ISO_DATE_RE.finditer(text):
parsed = parse_iso_parts(m.group(1), m.group(2), m.group(3))
if parsed:
out.append(parsed)
for m in TEXT_DATE_RE.finditer(text):
if m.group(1) and m.group(2) and m.group(3):
mo = month_num(m.group(1))
if mo:
parsed = parse_iso_parts(m.group(3), str(mo), m.group(2))
if parsed:
out.append(parsed)
elif m.group(4) and m.group(5) and m.group(6):
mo = month_num(m.group(5))
if mo:
parsed = parse_iso_parts(m.group(6), str(mo), m.group(4))
if parsed:
out.append(parsed)
elif m.group(7) and m.group(8):
mo = month_num(m.group(7))
if mo:
parsed = parse_iso_parts(m.group(8), str(mo), None)
if parsed:
out.append(parsed)
return out
def parse_schema_date(value: str) -> date | tuple[int, int] | None:
value = value.strip()
m = re.match(r"(20\d{2})-(\d{2})-(\d{2})", value)
if m:
return parse_iso_parts(m.group(1), m.group(2), m.group(3))
m = re.match(r"(20\d{2})-(\d{2})$", value)
if m:
return parse_iso_parts(m.group(1), m.group(2), None)
vis = parse_visible_dates(value)
return vis[0] if vis else None
def dates_compatible(schema: date | tuple[int, int], visible: list[date | tuple[int, int]]) -> bool:
for item in visible:
if isinstance(schema, date) and isinstance(item, date):
if schema == item:
return True
elif isinstance(schema, date) and isinstance(item, tuple):
if (schema.year, schema.month) == item:
return True
elif isinstance(schema, tuple) and isinstance(item, date):
if schema == (item.year, item.month):
return True
elif isinstance(schema, tuple) and isinstance(item, tuple):
if schema == item:
return True
return False
def faq_questions(obj: dict) -> list[str]:
questions = []
for ent in as_list(obj.get("mainEntity") or obj.get("acceptedAnswer") and obj):
if not isinstance(ent, dict):
continue
name = text_of(ent.get("name") or ent.get("text"))
if name:
questions.append(name)
return questions
def author_from_schema(obj: dict) -> str:
for key in ("author", "creator"):
for item in as_list(obj.get(key)):
name = text_of(item)
if not name and isinstance(item, dict):
name = text_of(item.get("name"))
if name:
return name
return ""
def visible_author(html: str, text: str) -> str:
# Prefer markup, then "By Name" in the visible text.
for m in re.finditer(
r'(?:rel=["\']author["\']|class=["\'][^"\']*\b(?:author|byline)\b[^"\']*["\']|itemprop=["\']author["\'])[^>]*>([^<]{2,80})',
html,
re.I,
):
name = strip_tags(m.group(1))
if name:
return name
m = re.search(r"\b(?:by|written by|author)\s+([A-Z][A-Za-z.'-]+(?:\s+[A-Z][A-Za-z.'-]+){0,3})", text)
if m:
return m.group(1).strip()
return ""
def resolve_local(root: Path, href: str) -> Path | None:
href = href.strip()
if not href or href.startswith("#"):
return None
parsed = urlparse(href)
if parsed.scheme in {"http", "https", "mailto", "tel"}:
return None
path = unquote(parsed.path or href)
if path.startswith("./"):
path = path[2:]
path = path.lstrip("/")
if not path:
for name in ("index.html", "index.htm"):
candidate = root / name
if candidate.is_file():
return candidate
return root / "index.html"
candidate = root / path
if candidate.is_file():
return candidate
if candidate.is_dir():
for name in ("index.html", "index.htm"):
inner = candidate / name
if inner.is_file():
return inner
if not candidate.suffix:
for suffix in (".html", ".htm", ".md"):
alt = root / (path + suffix)
if alt.is_file():
return alt
return candidate
@dataclass
class Finding:
code: str
severity: str
path: str
detail: str
@dataclass
class Report:
root: Path
business_name: str
question: str
page: str
answer_terms: list[str] = field(default_factory=list)
title: str = ""
h1: str = ""
files: list[str] = field(default_factory=list)
jsonld_blocks: int = 0
findings: list[Finding] = field(default_factory=list)
def add(self, code: str, severity: str, path: str, detail: str) -> None:
self.findings.append(Finding(code, severity, path, detail))
def counts(self) -> tuple[int, int]:
fails = sum(1 for f in self.findings if f.severity == "fail")
warns = sum(1 for f in self.findings if f.severity == "warn")
return fails, warns
def scan_answer_page(report: Report, path: Path, html: str) -> None:
relpath = rel(report.root, path)
title = first_title(html)
h1 = first_h1(html)
report.title = title
report.h1 = h1
body = main_text(html)
all_text = visible_text(html)
blocks = iter_jsonld(html)
report.jsonld_blocks += len(blocks)
needed = significant_tokens(report.question)
hay = set(significant_tokens(title + " " + h1))
matched = [t for t in needed if t in hay]
if needed:
ratio = len(matched) / len(needed)
if ratio < 0.6:
report.add(
"question-mismatch",
"fail",
relpath,
"title and H1 only reuse "
f"{len(matched)} of {len(needed)} significant words from the question "
f"({', '.join(needed)})",
)
opening = first_n_words(body, 90).lower()
if report.answer_terms:
if not any(term.lower() in opening for term in report.answer_terms):
report.add(
"answer-buried",
"fail",
relpath,
"the first 90 words of the page do not contain any of: "
+ ", ".join(report.answer_terms),
)
valid_blocks = [b for b in blocks if not b.get("_invalid")]
for b in blocks:
if b.get("_invalid"):
report.add(
"schema-invalid",
"fail",
relpath,
"JSON-LD block does not parse as JSON",
)
if not valid_blocks:
report.add(
"schema-missing",
"fail",
relpath,
"the answer page has no usable JSON-LD",
)
faq_from_schema: list[str] = []
schema_dates: list[tuple[str, date | tuple[int, int]]] = []
schema_authors: list[str] = []
has_review_schema = False
review_count = None
rating_value = None
for obj in valid_blocks:
t = types_of(obj)
if "FAQPage" in t:
faq_from_schema.extend(faq_questions(obj))
if t & {"Review", "AggregateRating"} or obj.get("review") or obj.get("aggregateRating"):
has_review_schema = True
agg = obj.get("aggregateRating")
if not isinstance(agg, dict) and "AggregateRating" in t:
agg = obj
if isinstance(agg, dict):
review_count = agg.get("reviewCount") or agg.get("ratingCount") or review_count
rating_value = agg.get("ratingValue") or rating_value
if t & {"LocalBusiness", "Organization", "ProfessionalService", "Store"}:
name = text_of(obj.get("name"))
if name and report.business_name and not names_close(name, report.business_name):
report.add(
"schema-name-mismatch",
"fail",
relpath,
f"JSON-LD name is {name!r}, expected {report.business_name!r}",
)
for key in ("dateModified", "datePublished"):
raw = text_of(obj.get(key))
if raw:
parsed = parse_schema_date(raw)
if parsed:
schema_dates.append((key, parsed))
author = author_from_schema(obj)
if author:
schema_authors.append(author)
if has_review_schema:
lowered = all_text.lower()
has_word = "review" in lowered or "reviews" in lowered
count_ok = review_count is None or str(review_count) in lowered
rating_ok = rating_value is None or str(rating_value) in lowered
if not (has_word and (count_ok or rating_ok)):
report.add(
"schema-invented-reviews",
"fail",
relpath,
"JSON-LD has Review or AggregateRating, but the visible page "
"does not show matching review text"
+ (f" (reviewCount={review_count})" if review_count is not None else ""),
)
missing_faq = []
lowered_text = re.sub(r"\s+", " ", all_text.lower())
for q in faq_from_schema:
if q.lower() not in lowered_text:
missing_faq.append(q)
if missing_faq:
report.add(
"schema-faq-mismatch",
"fail",
relpath,
"FAQPage questions not present in visible text: "
+ "; ".join(missing_faq),
)
vis_author = visible_author(html, all_text)
if not vis_author:
report.add(
"author-missing",
"fail",
relpath,
"no visible author or byline on the answer page"
+ (f" (schema has {schema_authors[0]!r})" if schema_authors else ""),
)
visible_dates = parse_visible_dates(all_text)
if not visible_dates:
report.add(
"date-missing",
"fail",
relpath,
"no visible published or updated date on the answer page",
)
elif schema_dates:
unmatched = []
for key, parsed in schema_dates:
if not dates_compatible(parsed, visible_dates):
unmatched.append(f"{key}={parsed}")
if unmatched:
report.add(
"date-mismatch",
"fail",
relpath,
"schema date does not match a visible date: " + ", ".join(unmatched),
)
def scan_other_html(report: Report, path: Path, html: str) -> None:
relpath = rel(report.root, path)
blocks = iter_jsonld(html)
report.jsonld_blocks += len(blocks)
if not report.title:
title = first_title(html)
if title:
report.title = title
for obj in blocks:
if obj.get("_invalid"):
report.add(
"schema-invalid",
"fail",
relpath,
"JSON-LD block does not parse as JSON",
)
continue
t = types_of(obj)
if t & {"LocalBusiness", "Organization", "ProfessionalService", "Store"}:
name = text_of(obj.get("name"))
if name and report.business_name and not names_close(name, report.business_name):
report.add(
"schema-name-mismatch",
"fail",
relpath,
f"JSON-LD name is {name!r}, expected {report.business_name!r}",
)
def scan_llms_txt(report: Report, path: Path, text: str) -> None:
relpath = rel(report.root, path)
links = list(LLMS_LINK_RE.finditer(text))
if not links and text.strip() == "":
report.add("llms-txt-empty", "fail", relpath, "llms.txt is empty")
return
for m in links:
href = m.group(2).strip()
local = resolve_local(report.root, href)
if local is None:
continue
if not local.is_file():
report.add(
"llms-txt-broken-link",
"fail",
relpath,
f"link {m.group(1)!r} points at {href}, which is not in the tree",
)
for line in text.splitlines():
stripped = line.strip()
if not stripped or stripped.startswith("#"):
continue
# Descriptions after a markdown link, or blockquote / plain lines.
desc = stripped
if "](" in stripped:
desc = stripped.split(")", 1)[-1].lstrip(" :-")
if len(desc.split()) < 3:
continue
if TRAILING_CUT_RE.search(desc):
report.add(
"llms-txt-truncated",
"fail",
relpath,
f"line looks cut mid-sentence: {desc[:120]}",
)
def scan_tree(report: Report) -> None:
page_path = (report.root / report.page).resolve()
found_page = False
for path in iter_files(report.root):
report.files.append(rel(report.root, path))
name = path.name.lower()
suffix = path.suffix.lower()
if suffix not in SCAN_SUFFIXES and name not in {"llms.txt", "robots.txt"}:
continue
try:
text = path.read_text(encoding="utf-8")
except (UnicodeDecodeError, OSError):
continue
if name == "llms.txt":
scan_llms_txt(report, path, text)
continue
if suffix in {".html", ".htm"}:
if path.resolve() == page_path:
found_page = True
scan_answer_page(report, path, text)
else:
scan_other_html(report, path, text)
if not found_page:
report.add(
"page-missing",
"fail",
report.page,
f"answer page {report.page} is not in the tree",
)
llms = report.root / "llms.txt"
if not llms.is_file():
report.add(
"llms-txt-missing",
"warn",
"llms.txt",
"no llms.txt in the site root (optional, but worth a look)",
)
def format_report(report: Report) -> str:
fails, warns = report.counts()
lines = [
"aeo_check.py (local files only)",
f"root: {report.root}",
f"business: {report.business_name}",
f"question: {report.question}",
f"page: {report.page}",
"",
"TREE",
f" title {report.title or '(none)'}",
f" h1 {report.h1 or '(none)'}",
f" files {len(report.files)}",
f" json-ld blocks {report.jsonld_blocks}",
"",
"FINDINGS",
]
if not report.findings:
lines.append(" (none)")
else:
for f in report.findings:
lines.append(f" [{f.severity}] {f.code:24} {f.path}")
lines.append(f" {f.detail}")
lines.extend(
[
"",
"VERDICT",
f" {fails} fail, {warns} warning",
]
)
if fails:
lines.append(" The page is not ready to be quoted as the answer.")
elif warns:
lines.append(" No blocking AEO fails; warnings are still worth a look.")
else:
lines.append(" No AEO fails on the local files for this question.")
lines.append(" This is not a promise an engine will cite the live page.")
return "\n".join(lines) + "\n"
def build_report(
root: Path,
business_name: str,
question: str,
page: str,
answer_terms: list[str],
) -> Report:
report = Report(
root=root,
business_name=business_name,
question=question,
page=page,
answer_terms=answer_terms,
)
scan_tree(report)
return report
def parse_terms(raw: str | None) -> list[str]:
if not raw:
return []
return [part.strip() for part in raw.split(",") if part.strip()]
# ---------------------------------------------------------------------------
# Tests
# ---------------------------------------------------------------------------
QUESTION = "How long does custom letterpress wedding stationery take?"
BUSINESS = "Pell & Press Stationers"
TERMS = ["six to eight weeks", "six weeks"]
def _write(base: Path, relpath: str, content: str) -> Path:
path = base / relpath
path.parent.mkdir(parents=True, exist_ok=True)
path.write_text(content, encoding="utf-8")
return path
def _run(tmp: Path, page: str = "how-long.html", terms: list[str] | None = None) -> Report:
return build_report(tmp, BUSINESS, QUESTION, page, terms if terms is not None else TERMS)
PAGE_SHELL = """<!doctype html>
<html lang="en"><head>
<meta charset="utf-8">
<title>{title}</title>
{head}
</head>
<body>
<article>
<p class="byline">{byline}</p>
<h1>{h1}</h1>
{body}
</article>
</body></html>
"""
def make_page(
title: str,
h1: str,
body: str,
head: str = "",
byline: str = "",
) -> str:
return PAGE_SHELL.format(title=title, h1=h1, body=body, head=head, byline=byline)
GOOD_TITLE = "How Long Does Custom Letterpress Wedding Stationery Take? | Pell & Press Stationers"
GOOD_H1 = "How long does custom letterpress wedding stationery take?"
GOOD_OPENING = (
"<p>Most custom letterpress wedding stationery from Pell & Press "
"Stationers takes six to eight weeks from the first sketch to the box "
"arriving at your door. Rush work can sometimes be done in four weeks "
"if typography is already decided.</p>"
)
GOOD_DATE = '<p>Updated December 1, 2026</p>'
GOOD_BYLINE = "By Mara Pell"
GOOD_LD = """<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "How Long Does Custom Letterpress Wedding Stationery Take?",
"author": {"@type": "Person", "name": "Mara Pell"},
"datePublished": "2026-12-01",
"dateModified": "2026-12-01"
}
</script>"""
class AeoCheckTests(unittest.TestCase):
def test_question_match_pass(self):
import tempfile
with tempfile.TemporaryDirectory() as d:
root = Path(d)
_write(
root,
"how-long.html",
make_page(GOOD_TITLE, GOOD_H1, GOOD_DATE + GOOD_OPENING, GOOD_LD, GOOD_BYLINE),
)
codes = {f.code for f in _run(root).findings if f.severity == "fail"}
self.assertNotIn("question-mismatch", codes)
def test_question_mismatch_fail(self):
import tempfile
with tempfile.TemporaryDirectory() as d:
root = Path(d)
_write(
root,
"how-long.html",
make_page(
"Our Process | Pell & Press Stationers",
"A letterpress process built around your day",
GOOD_DATE + GOOD_OPENING,
GOOD_LD,
GOOD_BYLINE,
),
)
codes = {f.code for f in _run(root).findings if f.severity == "fail"}
self.assertIn("question-mismatch", codes)
def test_answer_first_pass(self):
import tempfile
with tempfile.TemporaryDirectory() as d:
root = Path(d)
_write(
root,
"how-long.html",
make_page(GOOD_TITLE, GOOD_H1, GOOD_DATE + GOOD_OPENING, GOOD_LD, GOOD_BYLINE),
)
codes = {f.code for f in _run(root).findings if f.severity == "fail"}
self.assertNotIn("answer-buried", codes)
def test_answer_buried_fail(self):
import tempfile
with tempfile.TemporaryDirectory() as d:
root = Path(d)
fluff = (
"<p>Welcome to the studio. We love paper, ink, and the sound of "
"the press in the morning. Families visit us from all over New "
"England to talk about invitation suites, typography, and the "
"feeling of thick cotton paper. This page walks through our "
"process in a relaxed way, with stories from the bench and a "
"few notes about how we work with couples during the busy "
"season. Please read to the end for the details.</p>"
"<h2>Later on</h2><p>Most suites take six to eight weeks.</p>"
)
_write(
root,
"how-long.html",
make_page(GOOD_TITLE, GOOD_H1, GOOD_DATE + fluff, GOOD_LD, GOOD_BYLINE),
)
codes = {f.code for f in _run(root).findings if f.severity == "fail"}
self.assertIn("answer-buried", codes)
def test_invented_reviews_fail(self):
import tempfile
with tempfile.TemporaryDirectory() as d:
root = Path(d)
ld = """<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "How Long Does Custom Letterpress Wedding Stationery Take?",
"author": {"@type": "Person", "name": "Mara Pell"},
"datePublished": "2026-12-01",
"aggregateRating": {"@type": "AggregateRating", "ratingValue": "4.9", "reviewCount": "128"}
}
</script>"""
_write(
root,
"how-long.html",
make_page(GOOD_TITLE, GOOD_H1, GOOD_DATE + GOOD_OPENING, ld, GOOD_BYLINE),
)
codes = {f.code for f in _run(root).findings if f.severity == "fail"}
self.assertIn("schema-invented-reviews", codes)
def test_reviews_with_visible_content_pass(self):
import tempfile
with tempfile.TemporaryDirectory() as d:
root = Path(d)
ld = """<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "How Long Does Custom Letterpress Wedding Stationery Take?",
"author": {"@type": "Person", "name": "Mara Pell"},
"datePublished": "2026-12-01",
"aggregateRating": {"@type": "AggregateRating", "ratingValue": "4.9", "reviewCount": "12"}
}
</script>"""
body = (
GOOD_DATE
+ GOOD_OPENING
+ "<p>12 reviews, average rating 4.9. One recent review said the suite arrived on week seven.</p>"
)
_write(
root,
"how-long.html",
make_page(GOOD_TITLE, GOOD_H1, body, ld, GOOD_BYLINE),
)
codes = {f.code for f in _run(root).findings if f.severity == "fail"}
self.assertNotIn("schema-invented-reviews", codes)
def test_faq_mismatch_fail(self):
import tempfile
with tempfile.TemporaryDirectory() as d:
root = Path(d)
ld = (
GOOD_LD[:-9]
+ """,
"@graph_ignore": true
}
</script>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "FAQPage",
"mainEntity": [
{"@type": "Question", "name": "How much does letterpress stationery cost?",
"acceptedAnswer": {"@type": "Answer", "text": "It depends."}},
{"@type": "Question", "name": "When should we start?",
"acceptedAnswer": {"@type": "Answer", "text": "Eight weeks out."}}
]
}
</script>"""
)
body = GOOD_DATE + GOOD_OPENING + "<h2>When should we start?</h2><p>Eight weeks out is comfortable.</p>"
_write(root, "how-long.html", make_page(GOOD_TITLE, GOOD_H1, body, ld, GOOD_BYLINE))
findings = [f for f in _run(root).findings if f.code == "schema-faq-mismatch"]
self.assertTrue(findings)
self.assertIn("How much does letterpress stationery cost?", findings[0].detail)
def test_faq_match_pass(self):
import tempfile
with tempfile.TemporaryDirectory() as d:
root = Path(d)
ld = """<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "FAQPage",
"mainEntity": [
{"@type": "Question", "name": "When should we start?",
"acceptedAnswer": {"@type": "Answer", "text": "Eight weeks out."}}
]
}
</script>""" + GOOD_LD
body = GOOD_DATE + GOOD_OPENING + "<h2>When should we start?</h2><p>Eight weeks out is comfortable.</p>"
_write(root, "how-long.html", make_page(GOOD_TITLE, GOOD_H1, body, ld, GOOD_BYLINE))
codes = {f.code for f in _run(root).findings if f.severity == "fail"}
self.assertNotIn("schema-faq-mismatch", codes)
def test_name_mismatch_fail(self):
import tempfile
with tempfile.TemporaryDirectory() as d:
root = Path(d)
_write(
root,
"how-long.html",
make_page(GOOD_TITLE, GOOD_H1, GOOD_DATE + GOOD_OPENING, GOOD_LD, GOOD_BYLINE),
)
_write(
root,
"index.html",
"""<!doctype html><title>Pell & Press</title>
<script type="application/ld+json">
{"@context":"https://schema.org","@type":"LocalBusiness","name":"Pell and Press"}
</script>""",
)
codes = {f.code for f in _run(root).findings if f.severity == "fail"}
self.assertIn("schema-name-mismatch", codes)
def test_name_ampersand_normalization_pass(self):
import tempfile
with tempfile.TemporaryDirectory() as d:
root = Path(d)
_write(
root,
"how-long.html",
make_page(GOOD_TITLE, GOOD_H1, GOOD_DATE + GOOD_OPENING, GOOD_LD, GOOD_BYLINE),
)
_write(
root,
"index.html",
"""<!doctype html><title>Home</title>
<script type="application/ld+json">
{"@context":"https://schema.org","@type":"LocalBusiness","name":"Pell and Press Stationers"}
</script>""",
)
codes = {f.code for f in _run(root).findings if f.severity == "fail"}
self.assertNotIn("schema-name-mismatch", codes)
def test_author_and_date_missing_fail(self):
import tempfile
with tempfile.TemporaryDirectory() as d:
root = Path(d)
_write(
root,
"how-long.html",
make_page(GOOD_TITLE, GOOD_H1, GOOD_OPENING, GOOD_LD, ""),
)
codes = {f.code for f in _run(root).findings if f.severity == "fail"}
self.assertIn("author-missing", codes)
self.assertIn("date-missing", codes)
def test_date_mismatch_fail(self):
import tempfile
with tempfile.TemporaryDirectory() as d:
root = Path(d)
ld = """<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "How Long Does Custom Letterpress Wedding Stationery Take?",
"author": {"@type": "Person", "name": "Mara Pell"},
"dateModified": "2024-03-12"
}
</script>"""
_write(
root,
"how-long.html",
make_page(GOOD_TITLE, GOOD_H1, GOOD_DATE + GOOD_OPENING, ld, GOOD_BYLINE),
)
codes = {f.code for f in _run(root).findings if f.severity == "fail"}
self.assertIn("date-mismatch", codes)
def test_author_and_date_pass(self):
import tempfile
with tempfile.TemporaryDirectory() as d:
root = Path(d)
_write(
root,
"how-long.html",
make_page(GOOD_TITLE, GOOD_H1, GOOD_DATE + GOOD_OPENING, GOOD_LD, GOOD_BYLINE),
)
codes = {f.code for f in _run(root).findings if f.severity == "fail"}
self.assertNotIn("author-missing", codes)
self.assertNotIn("date-missing", codes)
self.assertNotIn("date-mismatch", codes)
def test_llms_broken_link_fail(self):
import tempfile
with tempfile.TemporaryDirectory() as d:
root = Path(d)
_write(
root,
"how-long.html",
make_page(GOOD_TITLE, GOOD_H1, GOOD_DATE + GOOD_OPENING, GOOD_LD, GOOD_BYLINE),
)
_write(root, "llms.txt", "# Site\n\n- [About](/about): The studio story.\n")
codes = {f.code for f in _run(root).findings if f.severity == "fail"}
self.assertIn("llms-txt-broken-link", codes)
def test_llms_truncated_fail(self):
import tempfile
with tempfile.TemporaryDirectory() as d:
root = Path(d)
_write(
root,
"how-long.html",
make_page(GOOD_TITLE, GOOD_H1, GOOD_DATE + GOOD_OPENING, GOOD_LD, GOOD_BYLINE),
)
_write(
root,
"llms.txt",
"# Site\n\n- [Process](/how-long.html): The studio story and\n",
)
codes = {f.code for f in _run(root).findings if f.severity == "fail"}
self.assertIn("llms-txt-truncated", codes)
self.assertNotIn("llms-txt-broken-link", codes)
def test_llms_ok_pass(self):
import tempfile
with tempfile.TemporaryDirectory() as d:
root = Path(d)
_write(
root,
"how-long.html",
make_page(GOOD_TITLE, GOOD_H1, GOOD_DATE + GOOD_OPENING, GOOD_LD, GOOD_BYLINE),
)
_write(
root,
"llms.txt",
"# Site\n\n- [Process](/how-long.html): The six-to-eight-week timeline for a suite.\n",
)
codes = {f.code for f in _run(root).findings if f.severity == "fail"}
self.assertNotIn("llms-txt-broken-link", codes)
self.assertNotIn("llms-txt-truncated", codes)
self.assertNotIn("llms-txt-missing", {f.code for f in _run(root).findings})
def test_missing_llms_is_warning_only(self):
import tempfile
with tempfile.TemporaryDirectory() as d:
root = Path(d)
_write(
root,
"how-long.html",
make_page(GOOD_TITLE, GOOD_H1, GOOD_DATE + GOOD_OPENING, GOOD_LD, GOOD_BYLINE),
)
findings = _run(root).findings
self.assertTrue(any(f.code == "llms-txt-missing" and f.severity == "warn" for f in findings))
self.assertFalse(any(f.code == "llms-txt-missing" and f.severity == "fail" for f in findings))
def run_self_test() -> int:
suite = unittest.defaultTestLoader.loadTestsFromTestCase(AeoCheckTests)
result = unittest.TextTestRunner(verbosity=2).run(suite)
return 0 if result.wasSuccessful() else 1
def main(argv: list[str] | None = None) -> int:
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("root", nargs="?", help="site tree to scan")
parser.add_argument("--business-name", default="", help="expected Organization / LocalBusiness name")
parser.add_argument("--question", default="", help="the question you want this page to answer")
parser.add_argument("--page", default="", help="relative path of the candidate answer page")
parser.add_argument(
"--answer-terms",
default="",
help="comma-separated phrases that should appear in the first 90 words (any one is enough)",
)
parser.add_argument("--self-test", action="store_true", help="run unit tests and exit")
args = parser.parse_args(argv)
if args.self_test:
return run_self_test()
if not args.root or not args.question or not args.page:
parser.error("root, --question, and --page are required (or pass --self-test)")
root = Path(args.root).resolve()
if not root.is_dir():
print(f"error: {root} is not a directory", file=sys.stderr)
return 2
report = build_report(
root,
args.business_name,
args.question,
args.page,
parse_terms(args.answer_terms),
)
sys.stdout.write(format_report(report))
fails, _warns = report.counts()
return 1 if fails else 0
if __name__ == "__main__":
sys.exit(main())
Run 1: the site as the agent handed it over
$ python3 aeo_check.py --business-name "Pell & Press Stationers" \
--question "How long does custom letterpress wedding stationery take?" \
--page how-long.html --answer-terms "six to eight weeks,six weeks" \
fixtures/before
aeo_check.py (local files only)
root: fixtures/before
business: Pell & Press Stationers
question: How long does custom letterpress wedding stationery take?
page: how-long.html
TREE
title Our Process | Pell & Press Stationers
h1 A letterpress process built around your day
files 5
json-ld blocks 3
FINDINGS
[fail] llms-txt-broken-link llms.txt
link 'About' points at /about, which is not in the tree
[fail] llms-txt-truncated llms.txt
line looks cut mid-sentence: The studio story and
[fail] question-mismatch how-long.html
title and H1 only reuse 1 of 6 significant words from the question
(long, custom, letterpress, wedding, stationery, take)
[fail] answer-buried how-long.html
the first 90 words of the page do not contain any of:
six to eight weeks, six weeks
[fail] schema-invented-reviews how-long.html
JSON-LD has Review or AggregateRating, but the visible page
does not show matching review text (reviewCount=128)
[fail] schema-faq-mismatch how-long.html
FAQPage questions not present in visible text:
How much does letterpress stationery cost?; Do you offer foil stamping?
[fail] author-missing how-long.html
no visible author or byline on the answer page (schema has 'Mara Pell')
[fail] date-missing how-long.html
no visible published or updated date on the answer page
[fail] schema-name-mismatch index.html
JSON-LD name is 'Pell and Press', expected 'Pell & Press Stationers'
VERDICT
9 fail, 0 warning
The page is not ready to be quoted as the answer.
Nine findings, and the page still looks like a real studio. The title is grammatical. The FAQ accordion works. The JSON-LD parses. None of that is the test.
Run 2: I only fixed the homepage name
The mid tree is the tempting "quick SEO pass." I changed one string in index.html: the LocalBusiness name is now "Pell & Press Stationers." I did not touch the process page or llms.txt.
$ python3 aeo_check.py --business-name "Pell & Press Stationers" \
--question "How long does custom letterpress wedding stationery take?" \
--page how-long.html --answer-terms "six to eight weeks,six weeks" \
fixtures/mid
...
VERDICT
8 fail, 0 warning
The page is not ready to be quoted as the answer.
Nine findings down to eight. The homepage now agrees with the sign on the door. The page an answer engine would actually try to quote still buries the timeline, still invents 128 reviews, and still has an llms.txt that trails off.
This is why rewriting the homepage JSON-LD is not an AEO fix. The files people tidy first are often not the ones a model will lift.
Run 3: the page answers the question, and the markup matches it
The after tree keeps the same business and the same FAQ topics. The title and H1 now ask the question. The first paragraph states the six-to-eight-week timeline. The byline "By Mara Pell" and "Updated December 1, 2026" are visible, and the Article dates match. The FAQ schema asks the four questions that are actually on the page. There is no aggregate rating. The homepage name matches. The llms.txt links to files that exist, and every description is a complete sentence.
$ python3 aeo_check.py --business-name "Pell & Press Stationers" \
--question "How long does custom letterpress wedding stationery take?" \
--page how-long.html --answer-terms "six to eight weeks,six weeks" \
fixtures/after
aeo_check.py (local files only)
root: fixtures/after
business: Pell & Press Stationers
question: How long does custom letterpress wedding stationery take?
page: how-long.html
TREE
title How Long Does Custom Letterpress Wedding Stationery Take? | Pell & Press Stationers
h1 How long does custom letterpress wedding stationery take?
files 5
json-ld blocks 3
FINDINGS
(none)
VERDICT
0 fail, 0 warning
No AEO fails on the local files for this question.
This is not a promise an engine will cite the live page.
Nine findings down to zero. The last line is there on purpose. A clean tree means the page can be quoted. It does not mean ChatGPT, Gemini, or a Google AI Overview already does.
What the findings actually mean
A question mismatch is the "wrong snippet" problem: the model is handed a title about "our process" when the query is a timeline. A buried answer is the "wrong passage" problem: the first 40 to 90 words are atmosphere, and the fact sits under a cute heading. Invented reviews and mismatched FAQ questions are the trust problem: the structured data describes a page that is not there, which is the same class of slop as an agent card that stops mid-sentence. A missing visible author or date is the "who stands behind this, and when" problem. A name mismatch is the entity problem: "Pell and Press" and "Pell & Press Stationers" will not look like the same business to a model that is trying to be precise. A broken or truncated llms.txt is optional machinery that, once you publish it, has to be true. Google has said that llms.txt is not required for its own AI features. That is why a missing file is a warning, not a fail. If you ship the file anyway, the links have to resolve and the sentences have to finish.
The mid run is the one to stare at. Correcting the homepage name dropped one finding and left eight. Adding schema is easy. Making the schema describe the visible page, and putting the answer where a snippet can reach it, is the work.
What I would do with a real vibe-coded marketing site
If I were handed a marketing site tomorrow, because a prompt produced a polished guide or because I wanted the page to be quotable rather than merely live, I would do this before I called it done:
- Pick the one question the page is supposed to answer. Run
python3 aeo_check.py --business-name "Your Name" --question "..." --page the-page.html --answer-terms "..." .on the tree, on a machine you own. - Put the answer in the title, the H1, and the first paragraph. Atmosphere can come after the fact.
- Rewrite every schema finding, not only the Organization name on the homepage. If you are not prepared to show 128 reviews, do not put 128 reviews in the JSON. If the accordion has four questions, the FAQPage should have those four questions.
- Put the author and the date on the page, and make the schema dates match a visible one.
- If you add an
llms.txt, open every link and finish every sentence. If you do not want to maintain the file, do not ship it.
A site built with an AI website builder still has to pass this test. Generating a process page is the cheap part. Knowing whether an answer engine can quote it β without inventing reviews or citing a sentence that is not there β is the part that decides whether "we published a guide" is the same as "we answered the question."
What we do in PolyDraft, and what we do not claim
PolyDraft is the AI website builder we work on. We care about this because a page that ranks, or even one that is retrieved, is still useless if it cannot be lifted as the answer. The page-level checklist behind this checker is the AEO audit we published; the brand-level question of whether assistants name you at all is the visibility audit, and we treat those as separate jobs. Generating JSON-LD is easy. We do not claim that every page we ship already passes a check like this, or that a clean local scan means an engine will cite you. We still run checks like these on what we ship, and you should run them on anything with your name on the domain, whoever or whatever built it.
Before you call the guide done
- Search the answer page for the question, not just for a
<title>. If the H1 is "Our process," you have not picked a question yet. - Read the first 90 words out loud. If the fact is not in that stretch, move it up.
- Run
python3 aeo_check.py --business-name "Your Name" --question "..." --page the-page.html --answer-terms "..." .against the files you are shipping. - Diff the JSON-LD against the visible page. Delete review, FAQ, and date fields you are not prepared to show.
- Save the files and run the checker again after the next prompt "adds a few testimonials."
A vibe-coded site can be indexed, pretty, and still unquotable. Nine findings on a finished-looking process page is not a model being picky. It is the page not being an answer yet.
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.

