deploy L1-E: story-arc results experience (mirror, verdict, fix-kit journey)
Browse filesFiles changed (9)
- src/legibl/api/server.py+24-7
- src/legibl/api/static/app.js+207-82
- src/legibl/api/static/examples/flowboard.json+87-10
- src/legibl/api/static/examples/helpstack.json+81-15
- src/legibl/api/static/examples/shopfront.json+77-9
- src/legibl/api/static/index.html+112-92
- src/legibl/api/static/styles.css+118
- src/legibl/api/static/translations.jsAdded+43
- src/legibl/service/orchestrate.py+128
54 unmodified lines555657585960182 unmodified lines24324424524624724841 unmodified lines29029129229329429529629729829930030130254 unmodified linesreturn manifest, payloadsdef _env_int(name: str, default: int) -> int:try:182 unmodified linesraise HTTPException(status_code=404, detail="example not found")return {"id": example_id, "status": "done", "result": payload}@app.get("/crawl-policy")def crawl_policy() -> Response:text = (41 unmodified linesjob = manager.get(job_id)if job is None or job.status != "done" or not job.result:raise HTTPException(status_code=404, detail="no completed audit for that id")buffer = io.BytesIO()with zipfile.ZipFile(buffer, "w", zipfile.ZIP_DEFLATED) as zf:for artifact in job.result["artifacts"]:zf.writestr(artifact["filename"], artifact.get("content", ""))buffer.seek(0)headers = {"Content-Disposition": "attachment; filename=legibl-artifacts.zip"}return Response(buffer.read(), media_type="application/zip", headers=headers)@app.get("/")def index(request: Request) -> Response:54 unmodified lines5556575859606162636465666768697071727374182 unmodified lines25725825926026126226326426526626726826927041 unmodified lines31231331431531631731831954 unmodified linesreturn manifest, payloadsdef _build_kit_zip(payload: dict) -> bytes:"""Bundle the generated artifacts plus the plain-language cover sheet."""buffer = io.BytesIO()with zipfile.ZipFile(buffer, "w", zipfile.ZIP_DEFLATED) as zf:cover = payload.get("cover_sheet")if cover:zf.writestr("cover-sheet.md", cover)for artifact in payload.get("artifacts", []):zf.writestr(artifact["filename"], artifact.get("content", ""))buffer.seek(0)return buffer.read()def _env_int(name: str, default: int) -> int:try:182 unmodified linesraise HTTPException(status_code=404, detail="example not found")return {"id": example_id, "status": "done", "result": payload}@app.get("/api/examples/{example_id}/artifacts.zip")def download_example_kit(example_id: str) -> Response:payload = example_payloads.get(example_id)if payload is None:raise HTTPException(status_code=404, detail="example not found")headers = {"Content-Disposition": "attachment; filename=legibl-fix-kit.zip"}return Response(_build_kit_zip(payload), media_type="application/zip", headers=headers)@app.get("/crawl-policy")def crawl_policy() -> Response:text = (41 unmodified linesjob = manager.get(job_id)if job is None or job.status != "done" or not job.result:raise HTTPException(status_code=404, detail="no completed audit for that id")headers = {"Content-Disposition": "attachment; filename=legibl-fix-kit.zip"}return Response(_build_kit_zip(job.result), media_type="application/zip", headers=headers)@app.get("/")def index(request: Request) -> Response:
2 unmodified lines3456789101112131 unmodified line1516171819202118 unmodified lines404142434445464748495051524 unmodified lines575859606162636465666768695 unmodified lines757677787980818283848586878889909192939495969798991001011022 unmodified lines10510610710810911011111211311415 unmodified lines1301311321331341351361371381391401411429 unmodified lines1521531541551561571581591601611621631641651661671681696 unmodified lines1761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172 unmodified lines2202212222232242252262272282292302319 unmodified lines2412422432442452462472482 unmodified linesconst $ = (id) => document.getElementById(id);const esc = (v) => String(v == null ? "" : v).replace(/[&<>"']/g, (c) =>({ "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }[c]));const color = (n) => (n >= 80 ? "#2f6df6" : n >= 50 ? "#b7791f" : "#c24132");const cls = (s) => (s === "pass" ? "pass" : s === "partial" ? "warn" : "fail");const lbl = (s) => (s === "pass" ? "PASS" : s === "partial" ? "WARN" : "FAIL");let pollTimer = null;$("form").addEventListener("submit", async (e) => {e.preventDefault();1 unmodified lineif (!url) return;reset();$("go").disabled = true;$("go").textContent = "Auditing";$("progress").classList.remove("hide");try {const res = await fetch("/api/audits", {18 unmodified linesfunction finish() {$("go").disabled = false;$("go").textContent = "Audit";$("progress").classList.add("hide");}function showError(msg) {finish();$("error").textContent = "Audit failed: " + msg;$("error").classList.remove("hide");}4 unmodified linesconst data = await res.json();const events = data.events || [];const fetched = events.filter((e) => e.data && typeof e.data.n === "number").length;const errs = events.filter((e) => e.data && e.data.error).length;$("progressText").textContent ="Crawlingβ¦ " + fetched + " pages fetched" + (errs ? ", " + errs + " errors" : "");if (data.status === "done") {clearInterval(pollTimer);finish();render(id, data.result);} else if (data.status === "error") {clearInterval(pollTimer);showError(data.error || "unknown error");5 unmodified lines}, 700);}function render(id, result) {const audit = result.audit;const summary = result.summary;if (!summary.pages_crawled) {const reason = summary.first_error? " (" + summary.first_error + ")": "";showError("Couldn't crawl " + audit.origin + reason +". The site may be slow, blocking automated crawlers, or unreachable from here.");return;}$("results").classList.remove("hide");renderAgentView(result.agent_view);$("scoreNum").textContent = audit.score;$("scoreNum").style.color = color(audit.score);$("scoreLabel").textContent = audit.score_label;$("siteTitle").textContent = audit.origin;const blocked = summary.robots_blocked_bots || [];const meta = [2 unmodified lines(summary.sitemap_found ? "sitemap β" : "no sitemap"),(blocked.length ? blocked.length + " AI bots blocked" : "AI bots allowed"),];$("metaLine").innerHTML = meta.map((m) => `<span class="mini">${esc(m)}</span>`).join("");$("cats").innerHTML = Object.entries(audit.category_scores).map(([k, v]) => `<div class="bar"><div class="t">${esc(k)}</div><div class="track"><div class="fill" style="width:${v}%;background:${color(v)}"></div></div><div>${v}</div></div>`).join("");15 unmodified linesconst llms = (result.artifacts || []).find((a) => a.type === "llms_txt");$("llms").textContent = llms ? llms.content : "";const zip = $("zip");if (result.example) {zip.classList.add("hide");} else {zip.classList.remove("hide");zip.href = "/api/audits/" + id + "/artifacts.zip";}}const _SECTION_NAMES = {9 unmodified linesfunction renderConformance(conf) {const panel = $("conformancePanel");if (!panel) return;if (!conf || !conf.results || !conf.results.length) {panel.classList.add("hide");return;}panel.classList.remove("hide");const s = conf.summary || {};$("confMeta").textContent ="AgentReady v" + conf.spec_version + " \u00b7 " + (s.met || 0) + "/" + (s.applicable || 0) + " applicable met";$("confSub").textContent ="Conformance to the AgentReady standard (agentready.org) \u2014 reported separately from the readiness score.";const bySec = {};conf.results.forEach((r) => { (bySec[r.section] = bySec[r.section] || []).push(r); });$("conformance").innerHTML = _SECTION_ORDER.filter((k) => bySec[k]).map((k) => {const rows = bySec[k].map((r) => {const [cssState, label] = _STATE_CHIP[r.state] || ["na", "?"];6 unmodified lines}).join("");}// --- Agent's-eye view: show a cold visitor what an agent actually reads -------function renderAgentView(av) {const panel = $("agentViewPanel");if (!panel) return;if (!av) { panel.classList.add("hide"); return; }panel.classList.remove("hide");$("avVerdict").textContent = av.verdict || "What an AI agent actually reads";const parts = [];const words = Number(av.words || 0);parts.push(words.toLocaleString() + (words === 1 ? " word" : " words") + " an agent can read");if (av.pages_total) parts.push(av.pages_readable + " of " + av.pages_total + " pages readable");$("avSub").textContent = parts.join(" \u00b7 ");const md = (av.sample_markdown || "").trim();const pre = $("avMarkdown");if (md) {pre.textContent = md.length > 1600 ? md.slice(0, 1600) + "\n\u2026" : md;pre.classList.remove("empty");} else {pre.textContent = "An agent sees no readable text here \u2014 the page is empty until JavaScript runs.";pre.classList.add("empty");}const misses = av.misses || [];$("avMisses").innerHTML = misses.length? misses.map((m) => `<div class="miss"><b>${esc(m.title)}</b><span>${esc(m.detail)}</span></div>`).join(""): `<div class="miss ok"><b>Nothing major</b><span>An agent can read this page's content cleanly.</span></div>`;panel.classList.remove("av-good", "av-warn", "av-bad");const blocked = (av.blocked_bots || []).length >= 3;panel.classList.add(words < 30 || blocked ? "av-bad" : misses.length ? "av-warn" : "av-good");}// --- Preloaded example audits (cached; no live crawl) ------------------------async function loadExamples() {const wrap = $("examples");2 unmodified linesconst data = await res.json();const list = data.examples || [];if (!wrap || !list.length) { if (wrap) wrap.classList.add("hide"); return; }$("exChips").innerHTML = list.map((e) =>`<button type="button" class="ex-chip" data-id="${esc(e.id)}"><span class="ex-score" style="color:${color(e.score)}">${esc(e.score)}</span><span class="ex-text"><b>${esc(e.label)}</b><span>${esc(e.teaser)}</span></span></button>`).join("");$("exChips").querySelectorAll(".ex-chip").forEach((b) =>b.addEventListener("click", () => loadExample(b.getAttribute("data-id"))));} catch (_ex) {if (wrap) wrap.classList.add("hide");9 unmodified linesconst data = await res.json();if (!res.ok) throw new Error(data.detail || "example unavailable");finish();render(id, data.result);$("agentViewPanel").scrollIntoView({ behavior: "smooth", block: "start" });} catch (ex) {showError(ex.message);}2 unmodified lines34567891011121314151617181 unmodified line2021222324252618 unmodified lines454647484950515253545556574 unmodified lines62636465666768697071725 unmodified lines787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542 unmodified lines25725825926026126226326426526615 unmodified lines2822832842852862872889 unmodified lines2982993003013023033043053063073083093103113123133143153163173183193203213226 unmodified lines3293303313323333343352 unmodified lines3383393403413423433443453463473483493503513523533543553563579 unmodified lines3673683693703713723732 unmodified linesconst $ = (id) => document.getElementById(id);const esc = (v) => String(v == null ? "" : v).replace(/[&<>"']/g, (c) =>({ "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }[c]));const color = (n) => (n >= 80 ? "#1f9d6b" : n >= 50 ? "#b7791f" : "#c24132");const cls = (s) => (s === "pass" ? "pass" : s === "partial" ? "warn" : "fail");const lbl = (s) => (s === "pass" ? "PASS" : s === "partial" ? "WARN" : "FAIL");const T = (typeof LEGIBL_T !== "undefined")? LEGIBL_T : { problem: (x) => x, categoryName: (x) => x };let pollTimer = null;let current = null; // { zipBase, example, coverSheet }// --- form + polling ----------------------------------------------------------$("form").addEventListener("submit", async (e) => {e.preventDefault();1 unmodified lineif (!url) return;reset();$("go").disabled = true;$("go").textContent = "Readingβ¦";$("progress").classList.remove("hide");try {const res = await fetch("/api/audits", {18 unmodified linesfunction finish() {$("go").disabled = false;$("go").textContent = "Show me";$("progress").classList.add("hide");}function showError(msg) {finish();$("error").textContent = "Couldn't read that site: " + msg;$("error").classList.remove("hide");}4 unmodified linesconst data = await res.json();const events = data.events || [];const fetched = events.filter((e) => e.data && typeof e.data.n === "number").length;$("progressText").textContent = "Reading your siteβ¦ " + fetched + " pages so far";if (data.status === "done") {clearInterval(pollTimer);finish();render(id, data.result, "/api/audits/" + id);} else if (data.status === "error") {clearInterval(pollTimer);showError(data.error || "unknown error");5 unmodified lines}, 700);}// --- render: the five beats --------------------------------------------------function render(id, result, zipBase) {const summary = result.summary;if (!summary.pages_crawled) {showError((summary.first_error ? summary.first_error + " β " : "") +"the site may be slow, blocking automated readers, or unreachable from here.");return;}current = { zipBase, example: !!result.example, coverSheet: result.cover_sheet || "" };$("results").classList.remove("hide");resetFixKit();renderMirror(result.agent_view); // beat 2renderVerdict(result); // beat 3 (score counts up after the mirror)renderTechnical(result); // hidden until toggled$("technicalView").classList.add("hide");$("techToggle").textContent = "Show the technical details";$("mirrorPanel").scrollIntoView({ behavior: "smooth", block: "start" });}// Beat 2 β the mirror: your page, human vs AIfunction renderMirror(av) {const m = (av && av.mirror) || { human: {}, agent: [], ghosts: [], agent_words: 0 };const h = m.human || {};$("mHost").textContent = h.host || (av && av.origin) || "your site";const navHtml = (h.nav || []).length? `<div class="pg-nav">${h.nav.map((n) => `<span>${esc(n)}</span>`).join("")}</div>` : "";const heads = (h.headings || []).map((t, i) =>i === 0 ? `<div class="pg-h1">${esc(t)}</div>` : `<div class="pg-h2">${esc(t)}</div>`).join("");const imgBox = h.image_count? `<div class="pg-img">πΌ ${h.image_count} image${h.image_count > 1 ? "s" : ""}</div>` : "";$("mHuman").innerHTML = navHtml +(h.title ? `<div class="pg-title">${esc(h.title)}</div>` : "") +heads + imgBox + '<div class="pg-bar"></div>'.repeat(4);const stream = (m.agent || []).map((b) =>b.kind === "heading" ? `<div class="ag-h">${esc(b.text)}</div>`: `<div class="ag-t">${esc(b.text)}</div>`).join("");const ghosts = (m.ghosts || []).map((g) => `<div class="ag-ghost">β§ ${esc(g)}</div>`).join("");const empty = (!stream && !ghosts)? `<div class="ag-ghost">β§ AI finds no readable text on this page.</div>` : "";$("mAgent").innerHTML = stream + ghosts + empty;$("mAgent").classList.toggle("sparse", (m.agent || []).length < 3);const w = Number(m.agent_words || 0);let c = (w === 0)? "On this page, AI reads 0 words β it's blank until JavaScript runs in a browser.": `On this page, a person reads the whole thing. AI comes away with ${w.toLocaleString()} word${w === 1 ? "" : "s"}.`;if (av.pages_total > 1) {c += ` Across your site, AI can fully read ${av.pages_readable} of ${av.pages_total} pages.`;}$("mCounter").textContent = c;}// Beat 3 β the verdict, in their wordsfunction renderVerdict(result) {const audit = result.audit;const av = result.agent_view;const score = audit.score;$("scoreRing").style.setProperty("--c", color(score));$("scoreRing").style.setProperty("--p", score);const line =(av.words < 30 && (av.js_pages || av.primary_render_mode === "js-dependent"))? "Right now, AI sees almost nothing on your site.": score >= 80 ? "Good news β AI can read your site well.": score >= 50 ? "AI can read some of your site β but it's missing things.": "Right now, AI struggles to read your site.";$("verdictLine").textContent = line;const host = (av.mirror && av.mirror.human && av.mirror.human.host) || av.origin;const n = result.summary.pages_crawled;$("verdictSite").textContent = `${host} Β· ${n} page${n > 1 ? "s" : ""} checked`;const probs = (av.top_problems || []).slice(0, 3);$("problems").innerHTML = probs.length? probs.map((p) =>`<div class="prob"><span class="prob-dot ${p.status === "fail" ? "bad" : "warn"}"></span>${esc(T.problem(p.id))}</div>`).join(""): `<div class="prob"><span class="prob-dot ok"></span>Nothing major β AI reads your site cleanly.</div>`;$("cats").innerHTML = Object.entries(audit.category_scores).map(([k, v]) =>`<div class="bar"><div class="t">${esc(T.categoryName(k))}</div><div class="track"><div class="fill" style="width:${v}%;background:${color(v)}"></div></div><div>${v}</div></div>`).join("");countUp($("scoreNum"), score, 780, color(score));}function countUp(el, target, ms, col) {el.style.color = col;const start = performance.now();const step = (now) => {const t = Math.min(1, (now - start) / ms);el.textContent = Math.round(target * (1 - Math.pow(1 - t, 3)));if (t < 1) requestAnimationFrame(step);else el.textContent = target;};setTimeout(() => requestAnimationFrame(step), 450); // let the mirror land first}// Beat 4 β the fix-kit journey (real pipeline stages, <= 3s total)const FIXKIT_STAGES = ["Re-reading your pagesβ¦","Writing your AI welcome fileβ¦","Building a clean copy AI can readβ¦","Describing your business for AIβ¦","Packing your kitβ¦",];const STAGE_MS = 520; // 5 stages -> 2600ms total, under the 3s capfunction resetFixKit() {$("fixkitStart").classList.remove("hide");$("fixkitProgress").classList.add("hide");$("fixkitDone").classList.add("hide");$("stages").innerHTML = "";$("genKit").disabled = false;}$("genKit").addEventListener("click", () => {if (!current) return;$("fixkitStart").classList.add("hide");$("fixkitProgress").classList.remove("hide");const ul = $("stages");ul.innerHTML = FIXKIT_STAGES.map((s, i) =>`<li class="stage" data-i="${i}"><span class="spin"></span>${esc(s)}</li>`).join("");const items = ul.querySelectorAll(".stage");let i = 0;const tick = () => {if (i > 0) items[i - 1].classList.add("done");if (i >= FIXKIT_STAGES.length) { showKit(); return; }items[i].classList.add("active");i += 1;setTimeout(tick, STAGE_MS);};tick();});function showKit() {$("fixkitProgress").classList.add("hide");$("fixkitDone").classList.remove("hide");$("kitZip").href = (current.zipBase || "") + "/artifacts.zip";$("coverSheet").textContent = current.coverSheet || "";$("fixkitDone").scrollIntoView({ behavior: "smooth", block: "center" });}// Beat 5 β recheck + technical toggle$("recheck").addEventListener("click", () => {reset();window.scrollTo({ top: 0, behavior: "smooth" });$("url").focus();});$("techToggle").addEventListener("click", (e) => {e.preventDefault();const tv = $("technicalView");const open = tv.classList.toggle("hide") === false;$("techToggle").textContent = open ? "Hide the technical details" : "Show the technical details";if (open) tv.scrollIntoView({ behavior: "smooth", block: "start" });});// --- technical view (jargon lives here, behind the toggle) -------------------function renderTechnical(result) {const audit = result.audit;const summary = result.summary;$("tScoreNum").textContent = audit.score;$("tScoreNum").style.color = color(audit.score);$("tScoreLabel").textContent = audit.score_label;$("tSiteTitle").textContent = audit.origin;const blocked = summary.robots_blocked_bots || [];const meta = [2 unmodified lines(summary.sitemap_found ? "sitemap β" : "no sitemap"),(blocked.length ? blocked.length + " AI bots blocked" : "AI bots allowed"),];$("tMetaLine").innerHTML = meta.map((m) => `<span class="mini">${esc(m)}</span>`).join("");$("tCats").innerHTML = Object.entries(audit.category_scores).map(([k, v]) =>`<div class="bar"><div class="t">${esc(k)}</div><div class="track"><div class="fill" style="width:${v}%;background:${color(v)}"></div></div><div>${v}</div></div>`).join("");15 unmodified linesconst llms = (result.artifacts || []).find((a) => a.type === "llms_txt");$("llms").textContent = llms ? llms.content : "";$("zip").href = (current.zipBase || "") + "/artifacts.zip";}const _SECTION_NAMES = {9 unmodified linesfunction renderConformance(conf) {const panel = $("conformancePanel");if (!panel) return;if (!conf || !conf.results || !conf.results.length) { panel.classList.add("hide"); return; }panel.classList.remove("hide");const s = conf.summary || {};$("confMeta").textContent ="AgentReady v" + conf.spec_version + " \u00b7 " + (s.met || 0) + "/" + (s.applicable || 0) + " applicable met";$("confSub").textContent ="Conformance to the AgentReady standard (agentready.org) \u2014 reported separately from the readiness score.";const na = $("showNA");const draw = () => drawConformance(conf, na && na.checked);draw();if (na) na.onchange = draw;}function drawConformance(conf, showNA) {const bySec = {};conf.results.forEach((r) => {if (!showNA && (r.state === "not_applicable" || r.state === "not_detectable")) return;(bySec[r.section] = bySec[r.section] || []).push(r);});$("conformance").innerHTML = _SECTION_ORDER.filter((k) => bySec[k]).map((k) => {const rows = bySec[k].map((r) => {const [cssState, label] = _STATE_CHIP[r.state] || ["na", "?"];6 unmodified lines}).join("");}// --- example tiles: mini split-screens (beat 1 preview) ----------------------async function loadExamples() {const wrap = $("examples");2 unmodified linesconst data = await res.json();const list = data.examples || [];if (!wrap || !list.length) { if (wrap) wrap.classList.add("hide"); return; }$("exTiles").innerHTML = list.map((e) => {const empty = Number(e.words) === 0;const right = empty? `<span class="tile-ghost">β§ empty</span>`: `<span class="tile-words">${Number(e.words).toLocaleString()} words</span>`;return `<button type="button" class="ex-tile" data-id="${esc(e.id)}"><span class="tile-mini"><span class="tile-human"><i></i><i></i><i></i></span><span class="tile-agent ${empty ? "empty" : ""}">${right}</span></span><span class="tile-text"><b>${esc(e.label)}</b><span>${esc(e.teaser)}</span></span></button>`;}).join("");$("exTiles").querySelectorAll(".ex-tile").forEach((b) =>b.addEventListener("click", () => loadExample(b.getAttribute("data-id"))));} catch (_ex) {if (wrap) wrap.classList.add("hide");9 unmodified linesconst data = await res.json();if (!res.ok) throw new Error(data.detail || "example unavailable");finish();render(id, data.result, "/api/examples/" + encodeURIComponent(id));} catch (ex) {showError(ex.message);}
62 unmodified lines6364656667686970115 unmodified lines186187188189190191192580 unmodified lines77377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481562 unmodified lines"detail": "There's no llms.txt, so agents get no machine-readable map of what matters on the site."}],"verdict": "An AI agent visiting this site comes away with almost nothing."},"audit": {"origin": "https://flowboard.example","start_url": "https://flowboard.example",115 unmodified lines"weight": 1.0,"score": 1.0,"status": "pass","evidence": "2 ms","recommendation": ""},{580 unmodified lines"not_detectable": 1}},"generated_at": "2026-07-05T08:58:51.370220Z"},"artifacts": [{"type": "llms_txt","filename": "llms.txt","media_type": "text/plain","source_hash": "4e135fa2b041a5ee","content": "# Flowboard\n\n> Flowboard app\n\n## Pages\n- [Flowboard](https://flowboard.example): Flowboard app\n\n---\nGenerated by Legibl. Curate this file to control what agents see.\n"},{"type": "markdown","filename": "markdown/index.md","media_type": "text/markdown","source_hash": "e361ecaa739bca79","content": "# Flowboard\n\n> Flowboard app\n"},{"type": "markdown_index","filename": "markdown/index.json","media_type": "application/json","source_hash": "3ce3059e6ff5d621","content": "{\n \"origin\": \"https://flowboard.example\",\n \"pages\": [\n {\n \"url\": \"https://flowboard.example\",\n \"title\": \"Flowboard\",\n \"path\": \"markdown/index.md\",\n \"words\": 0,\n \"source_hash\": \"e361ecaa739bca79\"\n }\n ]\n}"},{"type": "jsonld","filename": "jsonld-suggestions.json","media_type": "application/ld+json","source_hash": "b9f32ddac65558b4","content": "{\n \"origin\": \"https://flowboard.example\",\n \"suggestions\": [\n {\n \"url\": \"https://flowboard.example\",\n \"jsonld\": {\n \"@context\": \"https://schema.org\",\n \"url\": \"https://flowboard.example\",\n \"name\": \"Flowboard\",\n \"description\": \"Flowboard app\",\n \"@type\": \"WebSite\"\n }\n }\n ]\n}"},{"type": "manifest","filename": "manifest.json","media_type": "application/json","source_hash": "2a6fcac200d78e4c","content": "{\n \"origin\": \"https://flowboard.example\",\n \"start_url\": \"https://flowboard.example\",\n \"pages_crawled\": 1,\n \"artifacts\": [\n {\n \"type\": \"llms_txt\",\n \"filename\": \"llms.txt\",\n \"media_type\": \"text/plain\",\n \"source_hash\": \"4e135fa2b041a5ee\"\n },\n {\n \"type\": \"markdown\",\n \"filename\": \"markdown/index.md\",\n \"media_type\": \"text/markdown\",\n \"source_hash\": \"e361ecaa739bca79\"\n },\n {\n \"type\": \"markdown_index\",\n \"filename\": \"markdown/index.json\",\n \"media_type\": \"application/json\",\n \"source_hash\": \"3ce3059e6ff5d621\"\n },\n {\n \"type\": \"jsonld\",\n \"filename\": \"jsonld-suggestions.json\",\n \"media_type\": \"application/ld+json\",\n \"source_hash\": \"b9f32ddac65558b4\"\n }\n ],\n \"pages\": [\n {\n \"url\": \"https://flowboard.example\",\n \"source_hash\": \"e361ecaa739bca79\"\n }\n ]\n}"}],"example": {62 unmodified lines63646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147115 unmodified lines263264265266267268269580 unmodified lines85085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189262 unmodified lines"detail": "There's no llms.txt, so agents get no machine-readable map of what matters on the site."}],"verdict": "An AI agent visiting this site comes away with almost nothing.","mirror": {"human": {"host": "flowboard.example","title": "Flowboard","headings": [],"nav": [],"image_count": 0},"agent": [],"ghosts": ["This whole area is invisible to AI \u2014 it only appears once JavaScript runs."],"agent_words": 0},"top_problems": [{"id": "llms_txt","status": "fail","category": "Machine artifacts"},{"id": "sitemap","status": "fail","category": "Machine artifacts"},{"id": "render_mode","status": "fail","category": "Renderability"},{"id": "structured_data","status": "fail","category": "Meaning"},{"id": "sitemap_fresh","status": "fail","category": "Machine artifacts"},{"id": "text_ratio","status": "fail","category": "Renderability"},{"id": "semantic_landmarks","status": "fail","category": "Structure"},{"id": "heading_hierarchy","status": "fail","category": "Structure"},{"id": "canonical_og","status": "fail","category": "Meaning"},{"id": "single_h1","status": "fail","category": "Structure"},{"id": "noscript_fallback","status": "fail","category": "Renderability"},{"id": "meta_description","status": "partial","category": "Meaning"}]},"cover_sheet": "# Your AI-Readiness Fix Kit \u2014 flowboard.example\n\n**Score: 14/100 (High risk).** This measures how well AI assistants\n(ChatGPT, Claude, Perplexity, Google AI) can read and use your website. Higher is better.\n\n## The top things to fix\n1. You don't have an AI welcome file (llms.txt)\n2. AI has no map of the pages on your site\n3. Your content is invisible to AI \u2014 only people running JavaScript see it\n\n## What's in this kit (hand this to whoever runs your website)\n- **llms.txt** \u2014 your AI welcome file \u2014 upload it to your site root (yoursite.com/llms.txt)\n- **markdown/index.md** \u2014 a clean text copy of a page AI can read even when your site needs JavaScript\n- **markdown/index.json** \u2014 an index of those clean text pages\n- **jsonld-suggestions.json** \u2014 structured data telling AI what your business offers \u2014 paste into the page <head>\n- **manifest.json** \u2014 a summary of everything generated in this kit\n\n## How to check your work\nRe-run the free audit at https://legibl-app.hf.space after you publish these files.\n\n_Generated 2026-07-05 \u00b7 Legibl \u00b7 scoring spec 2.0.0._","audit": {"origin": "https://flowboard.example","start_url": "https://flowboard.example",115 unmodified lines"weight": 1.0,"score": 1.0,"status": "pass","evidence": "3 ms","recommendation": ""},{580 unmodified lines"not_detectable": 1}},"generated_at": "2026-07-05T10:07:39.011676Z"},"artifacts": [{"type": "llms_txt","filename": "llms.txt","media_type": "text/plain","source_hash": "7f54d11414dfacc0","content": "# Flowboard\n\n> Flowboard app\n\n## Pages\n- [Flowboard](https://flowboard.example): Flowboard app\n\n---\nGenerated by Legibl. Curate this file to control what agents see.\n"},{"type": "markdown","filename": "markdown/index.md","media_type": "text/markdown","source_hash": "bf41e86aeb0b8bce","content": "# Flowboard\n\n> Flowboard app\n"},{"type": "markdown_index","filename": "markdown/index.json","media_type": "application/json","source_hash": "2cfa0dbca4104435","content": "{\n \"origin\": \"https://flowboard.example\",\n \"pages\": [\n {\n \"url\": \"https://flowboard.example\",\n \"title\": \"Flowboard\",\n \"path\": \"markdown/index.md\",\n \"words\": 0,\n \"source_hash\": \"bf41e86aeb0b8bce\"\n }\n ]\n}"},{"type": "jsonld","filename": "jsonld-suggestions.json","media_type": "application/ld+json","source_hash": "bc7f3c8d8f94573c","content": "{\n \"origin\": \"https://flowboard.example\",\n \"suggestions\": [\n {\n \"url\": \"https://flowboard.example\",\n \"jsonld\": {\n \"@context\": \"https://schema.org\",\n \"url\": \"https://flowboard.example\",\n \"name\": \"Flowboard\",\n \"description\": \"Flowboard app\",\n \"@type\": \"WebSite\"\n }\n }\n ]\n}"},{"type": "manifest","filename": "manifest.json","media_type": "application/json","source_hash": "54bbe41878bed56b","content": "{\n \"origin\": \"https://flowboard.example\",\n \"start_url\": \"https://flowboard.example\",\n \"pages_crawled\": 1,\n \"artifacts\": [\n {\n \"type\": \"llms_txt\",\n \"filename\": \"llms.txt\",\n \"media_type\": \"text/plain\",\n \"source_hash\": \"7f54d11414dfacc0\"\n },\n {\n \"type\": \"markdown\",\n \"filename\": \"markdown/index.md\",\n \"media_type\": \"text/markdown\",\n \"source_hash\": \"bf41e86aeb0b8bce\"\n },\n {\n \"type\": \"markdown_index\",\n \"filename\": \"markdown/index.json\",\n \"media_type\": \"application/json\",\n \"source_hash\": \"2cfa0dbca4104435\"\n },\n {\n \"type\": \"jsonld\",\n \"filename\": \"jsonld-suggestions.json\",\n \"media_type\": \"application/ld+json\",\n \"source_hash\": \"bc7f3c8d8f94573c\"\n }\n ],\n \"pages\": [\n {\n \"url\": \"https://flowboard.example\",\n \"source_hash\": \"bf41e86aeb0b8bce\"\n }\n ]\n}"}],"example": {
57 unmodified lines5859606162636465315 unmodified lines381382383384385386387393 unmodified lines781782783784785786787724 unmodified lines1512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158257 unmodified lines"detail": "There's no llms.txt, so agents get no machine-readable map of what matters on the site."}],"verdict": "An agent can read this site \u2014 but it's missing part of the picture."},"audit": {"origin": "https://helpstack.example","start_url": "https://helpstack.example",315 unmodified lines"weight": 1.0,"score": 1.0,"status": "pass","evidence": "3 ms","recommendation": ""},{393 unmodified lines"weight": 1.0,"score": 1.0,"status": "pass","evidence": "3 ms","recommendation": ""},{724 unmodified lines"not_detectable": 1}},"generated_at": "2026-07-05T08:58:52.021740Z"},"artifacts": [{"type": "llms_txt","filename": "llms.txt","media_type": "text/plain","source_hash": "0970d51de2eba8c0","content": "# Zephyr SDK Documentation\n\n> Documentation for the Zephyr SDK: installation, guides, API reference, and frequently asked questions for developers.\n\n## Pages\n- [Zephyr SDK Documentation](https://helpstack.example): Documentation for the Zephyr SDK: installation, guides, API reference, and frequently asked questions for developers.\n- [API Reference \u2014 Zephyr SDK](https://helpstack.example/api.html): The Zephyr SDK API reference: handlers, the client, configuration options, and lifecycle hooks.\n- [FAQ \u2014 Zephyr SDK](https://helpstack.example/faq.html): Frequently asked questions about the Zephyr SDK: performance, compatibility, retries, and support.\n- [Guide \u2014 Zephyr SDK](https://helpstack.example/guide.html): A step-by-step guide to building your first event-driven handler with the Zephyr SDK.\n- [Install \u2014 Zephyr SDK](https://helpstack.example/install.html): Install the Zephyr SDK with pip and verify your setup in under a minute on Linux, macOS, or Windows.\n\n---\nGenerated by Legibl. Curate this file to control what agents see.\n"},{"type": "markdown","filename": "markdown/index.md","media_type": "text/markdown","source_hash": "d87ebd24b33eb500","content": "# Zephyr SDK Documentation\n\n> Documentation for the Zephyr SDK: installation, guides, API reference, and frequently asked questions for developers.\n\n## Zephyr SDK documentation\n\nZephyr is a small, dependency-light SDK for building event-driven services. These docs walk you through installing the SDK, writing your first handler, the full API reference, and answers to common questions from the community.\n\n## Start here\n\nNew to Zephyr? Begin with the installation instructions, then follow the guide to build a working service in about ten minutes. Experienced users can jump straight to the API reference.\n"},{"type": "markdown","filename": "markdown/install.md","media_type": "text/markdown","source_hash": "81443e43056aaaff","content": "# Install \u2014 Zephyr SDK\n\n> Install the Zephyr SDK with pip and verify your setup in under a minute on Linux, macOS, or Windows.\n\n## Installing Zephyr\n\nZephyr supports Python 3.11 and newer on Linux, macOS, and Windows. Install it from the package index and confirm the version to make sure everything is wired up correctly before you continue to the guide.\n\n```bash\npip install zephyr-sdk\nzephyr --version\n```\n\nIf the version prints without an error, you are ready to build your first handler in the guide.\n"},{"type": "markdown","filename": "markdown/guide.md","media_type": "text/markdown","source_hash": "768c18a9137a19b2","content": "# Guide \u2014 Zephyr SDK\n\n> A step-by-step guide to building your first event-driven handler with the Zephyr SDK.\n\n## Your first Zephyr handler\n\nA handler is a function that receives an event and returns a result. Zephyr takes care of subscribing to the queue, decoding the payload, and retrying on failure, so your code stays focused on the logic that matters.\n\n## Define a handler\n\nDecorate a function with the handler registration and Zephyr will route matching events to it. Handlers can be synchronous or asynchronous, and the runtime picks the right execution model automatically.\n\n## Run the service\n\nStart the worker from the command line and it will connect, subscribe, and begin processing events immediately, reporting health on a local endpoint.\n"},{"type": "markdown","filename": "markdown/api.md","media_type": "text/markdown","source_hash": "4edc27cdf2180f31","content": "# API Reference \u2014 Zephyr SDK\n\n> The Zephyr SDK API reference: handlers, the client, configuration options, and lifecycle hooks.\n\n## API reference\n\nThis reference lists the public surface of the Zephyr SDK. Everything not documented here is considered internal and may change between releases without notice, so build against these names only.\n\n## handler(event_type)\n\nRegister a function to receive events of a given type. Returns the wrapped function so it can be exported and tested directly.\n\n## Client.connect(url)\n\nOpen a connection to the broker and return a client you can use to publish events and query health.\n"},{"type": "markdown","filename": "markdown/faq.md","media_type": "text/markdown","source_hash": "cebdc63f393771e3","content": "# FAQ \u2014 Zephyr SDK\n\n> Frequently asked questions about the Zephyr SDK: performance, compatibility, retries, and support.\n\n## Frequently asked questions\n\n## Does Zephyr support async handlers?\n\nYes. Handlers may be synchronous or asynchronous, and the runtime detects which model to use and schedules work accordingly without any extra configuration on your part.\n\n## What happens when a handler fails?\n\nZephyr retries failed events with exponential backoff and, after the configured limit, moves them to a dead-letter queue so nothing is silently lost.\n"},{"type": "markdown_index","filename": "markdown/index.json","media_type": "application/json","source_hash": "c4a786e521b54816","content": "{\n \"origin\": \"https://helpstack.example\",\n \"pages\": [\n {\n \"url\": \"https://helpstack.example\",\n \"title\": \"Zephyr SDK Documentation\",\n \"path\": \"markdown/index.md\",\n \"words\": 69,\n \"source_hash\": \"d87ebd24b33eb500\"\n },\n {\n \"url\": \"https://helpstack.example/install.html\",\n \"title\": \"Install \u2014 Zephyr SDK\",\n \"path\": \"markdown/install.md\",\n \"words\": 60,\n \"source_hash\": \"81443e43056aaaff\"\n },\n {\n \"url\": \"https://helpstack.example/guide.html\",\n \"title\": \"Guide \u2014 Zephyr SDK\",\n \"path\": \"markdown/guide.md\",\n \"words\": 101,\n \"source_hash\": \"768c18a9137a19b2\"\n },\n {\n \"url\": \"https://helpstack.example/api.html\",\n \"title\": \"API Reference \u2014 Zephyr SDK\",\n \"path\": \"markdown/api.md\",\n \"words\": 75,\n \"source_hash\": \"4edc27cdf2180f31\"\n },\n {\n \"url\": \"https://helpstack.example/faq.html\",\n \"title\": \"FAQ \u2014 Zephyr SDK\",\n \"path\": \"markdown/faq.md\",\n \"words\": 63,\n \"source_hash\": \"cebdc63f393771e3\"\n }\n ]\n}"},{"type": "jsonld","filename": "jsonld-suggestions.json","media_type": "application/ld+json","source_hash": "9b8f8bac5206118e","content": "{\n \"origin\": \"https://helpstack.example\",\n \"suggestions\": [\n {\n \"url\": \"https://helpstack.example\",\n \"jsonld\": {\n \"@context\": \"https://schema.org\",\n \"url\": \"https://helpstack.example\",\n \"name\": \"Zephyr SDK Documentation\",\n \"description\": \"Documentation for the Zephyr SDK: installation, guides, API reference, and frequently asked questions for developers.\",\n \"@type\": \"WebSite\"\n }\n },\n {\n \"url\": \"https://helpstack.example/install.html\",\n \"jsonld\": {\n \"@context\": \"https://schema.org\",\n \"url\": \"https://helpstack.example/install.html\",\n \"name\": \"Install \u2014 Zephyr SDK\",\n \"description\": \"Install the Zephyr SDK with pip and verify your setup in under a minute on Linux, macOS, or Windows.\",\n \"@type\": \"Article\",\n \"headline\": \"Install \u2014 Zephyr SDK\"\n }\n },\n {\n \"url\": \"https://helpstack.example/guide.html\",\n \"jsonld\": {\n \"@context\": \"https://schema.org\",\n \"url\": \"https://helpstack.example/guide.html\",\n \"name\": \"Guide \u2014 Zephyr SDK\",\n \"description\": \"A step-by-step guide to building your first event-driven handler with the Zephyr SDK.\",\n \"@type\": \"Article\",\n \"headline\": \"Guide \u2014 Zephyr SDK\"\n }\n },\n {\n \"url\": \"https://helpstack.example/api.html\",\n \"jsonld\": {\n \"@context\": \"https://schema.org\",\n \"url\": \"https://helpstack.example/api.html\",\n \"name\": \"API Reference \u2014 Zephyr SDK\",\n \"description\": \"The Zephyr SDK API reference: handlers, the client, configuration options, and lifecycle hooks.\",\n \"@type\": \"Article\",\n \"headline\": \"API Reference \u2014 Zephyr SDK\"\n }\n },\n {\n \"url\": \"https://helpstack.example/faq.html\",\n \"jsonld\": {\n \"@context\": \"https://schema.org\",\n \"url\": \"https://helpstack.example/faq.html\",\n \"name\": \"FAQ \u2014 Zephyr SDK\",\n \"description\": \"Frequently asked questions about the Zephyr SDK: performance, compatibility, retries, and support.\",\n \"@type\": \"FAQPage\",\n \"mainEntity\": [\n {\n \"@type\": \"Question\",\n \"name\": \"Does Zephyr support async handlers?\",\n \"acceptedAnswer\": {\n \"@type\": \"Answer\",\n \"text\": \"Yes. Handlers may be synchronous or asynchronous, and the runtime detects which model to use and schedules work accordingly without any extra configuration on your part.\"\n }\n },\n {\n \"@type\": \"Question\",\n \"name\": \"What happens when a handler fails?\",\n \"acceptedAnswer\": {\n \"@type\": \"Answer\",\n \"text\": \"Zephyr retries failed events with exponential backoff and, after the configured limit, moves them to a dead-letter queue so nothing is silently lost.\"\n }\n }\n ]\n }\n }\n ]\n}"},{"type": "manifest","filename": "manifest.json","media_type": "application/json","source_hash": "b1f07a0bc30aebba","content": "{\n \"origin\": \"https://helpstack.example\",\n \"start_url\": \"https://helpstack.example\",\n \"pages_crawled\": 5,\n \"artifacts\": [\n {\n \"type\": \"llms_txt\",\n \"filename\": \"llms.txt\",\n \"media_type\": \"text/plain\",\n \"source_hash\": \"0970d51de2eba8c0\"\n },\n {\n \"type\": \"markdown\",\n \"filename\": \"markdown/index.md\",\n \"media_type\": \"text/markdown\",\n \"source_hash\": \"d87ebd24b33eb500\"\n },\n {\n \"type\": \"markdown\",\n \"filename\": \"markdown/install.md\",\n \"media_type\": \"text/markdown\",\n \"source_hash\": \"81443e43056aaaff\"\n },\n {\n \"type\": \"markdown\",\n \"filename\": \"markdown/guide.md\",\n \"media_type\": \"text/markdown\",\n \"source_hash\": \"768c18a9137a19b2\"\n },\n {\n \"type\": \"markdown\",\n \"filename\": \"markdown/api.md\",\n \"media_type\": \"text/markdown\",\n \"source_hash\": \"4edc27cdf2180f31\"\n },\n {\n \"type\": \"markdown\",\n \"filename\": \"markdown/faq.md\",\n \"media_type\": \"text/markdown\",\n \"source_hash\": \"cebdc63f393771e3\"\n },\n {\n \"type\": \"markdown_index\",\n \"filename\": \"markdown/index.json\",\n \"media_type\": \"application/json\",\n \"source_hash\": \"c4a786e521b54816\"\n },\n {\n \"type\": \"jsonld\",\n \"filename\": \"jsonld-suggestions.json\",\n \"media_type\": \"application/ld+json\",\n \"source_hash\": \"9b8f8bac5206118e\"\n }\n ],\n \"pages\": [\n {\n \"url\": \"https://helpstack.example\",\n \"source_hash\": \"d87ebd24b33eb500\"\n },\n {\n \"url\": \"https://helpstack.example/install.html\",\n \"source_hash\": \"81443e43056aaaff\"\n },\n {\n \"url\": \"https://helpstack.example/guide.html\",\n \"source_hash\": \"768c18a9137a19b2\"\n },\n {\n \"url\": \"https://helpstack.example/api.html\",\n \"source_hash\": \"4edc27cdf2180f31\"\n },\n {\n \"url\": \"https://helpstack.example/faq.html\",\n \"source_hash\": \"cebdc63f393771e3\"\n }\n ]\n}"}],"example": {57 unmodified lines585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131315 unmodified lines447448449450451452453393 unmodified lines847848849850851852853724 unmodified lines1578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164857 unmodified lines"detail": "There's no llms.txt, so agents get no machine-readable map of what matters on the site."}],"verdict": "An agent can read this site \u2014 but it's missing part of the picture.","mirror": {"human": {"host": "helpstack.example","title": "Zephyr SDK Documentation","headings": ["Zephyr SDK documentation","Start here"],"nav": ["Home","Install","Guide","API","FAQ"],"image_count": 0},"agent": [{"kind": "heading","text": "Zephyr SDK documentation"},{"kind": "text","text": "Zephyr is a small, dependency-light SDK for building event-driven services. These docs walk you through installing the SDK, writing your first handler, the full API reference, and answers to common questions from the community."},{"kind": "heading","text": "Start here"},{"kind": "text","text": "New to Zephyr? Begin with the installation instructions, then follow the guide to build a working service in about ten minutes. Experienced users can jump straight to the API reference."}],"ghosts": [],"agent_words": 69},"top_problems": [{"id": "llms_txt","status": "fail","category": "Machine artifacts"},{"id": "sitemap","status": "fail","category": "Machine artifacts"},{"id": "structured_data","status": "fail","category": "Meaning"},{"id": "sitemap_fresh","status": "fail","category": "Machine artifacts"},{"id": "heading_hierarchy","status": "partial","category": "Structure"}]},"cover_sheet": "# Your AI-Readiness Fix Kit \u2014 helpstack.example\n\n**Score: 56/100 (Needs work).** This measures how well AI assistants\n(ChatGPT, Claude, Perplexity, Google AI) can read and use your website. Higher is better.\n\n## The top things to fix\n1. You don't have an AI welcome file (llms.txt)\n2. AI has no map of the pages on your site\n3. AI can't tell what your business offers\n\n## What's in this kit (hand this to whoever runs your website)\n- **llms.txt** \u2014 your AI welcome file \u2014 upload it to your site root (yoursite.com/llms.txt)\n- **markdown/index.md** \u2014 a clean text copy of a page AI can read even when your site needs JavaScript\n- **markdown/install.md** \u2014 a clean text copy of a page AI can read even when your site needs JavaScript\n- **markdown/guide.md** \u2014 a clean text copy of a page AI can read even when your site needs JavaScript\n- **markdown/api.md** \u2014 a clean text copy of a page AI can read even when your site needs JavaScript\n- **markdown/faq.md** \u2014 a clean text copy of a page AI can read even when your site needs JavaScript\n- **markdown/index.json** \u2014 an index of those clean text pages\n- **jsonld-suggestions.json** \u2014 structured data telling AI what your business offers \u2014 paste into the page <head>\n- **manifest.json** \u2014 a summary of everything generated in this kit\n\n## How to check your work\nRe-run the free audit at https://legibl-app.hf.space after you publish these files.\n\n_Generated 2026-07-05 \u00b7 Legibl \u00b7 scoring spec 2.0.0._","audit": {"origin": "https://helpstack.example","start_url": "https://helpstack.example",315 unmodified lines"weight": 1.0,"score": 1.0,"status": "pass","evidence": "2 ms","recommendation": ""},{393 unmodified lines"weight": 1.0,"score": 1.0,"status": "pass","evidence": "2 ms","recommendation": ""},{724 unmodified lines"not_detectable": 1}},"generated_at": "2026-07-05T10:07:39.648588Z"},"artifacts": [{"type": "llms_txt","filename": "llms.txt","media_type": "text/plain","source_hash": "c5ee7835b86f8c48","content": "# Zephyr SDK Documentation\n\n> Documentation for the Zephyr SDK: installation, guides, API reference, and frequently asked questions for developers.\n\n## Pages\n- [Zephyr SDK Documentation](https://helpstack.example): Documentation for the Zephyr SDK: installation, guides, API reference, and frequently asked questions for developers.\n- [API Reference \u2014 Zephyr SDK](https://helpstack.example/api.html): The Zephyr SDK API reference: handlers, the client, configuration options, and lifecycle hooks.\n- [FAQ \u2014 Zephyr SDK](https://helpstack.example/faq.html): Frequently asked questions about the Zephyr SDK: performance, compatibility, retries, and support.\n- [Guide \u2014 Zephyr SDK](https://helpstack.example/guide.html): A step-by-step guide to building your first event-driven handler with the Zephyr SDK.\n- [Install \u2014 Zephyr SDK](https://helpstack.example/install.html): Install the Zephyr SDK with pip and verify your setup in under a minute on Linux, macOS, or Windows.\n\n---\nGenerated by Legibl. Curate this file to control what agents see.\n"},{"type": "markdown","filename": "markdown/index.md","media_type": "text/markdown","source_hash": "73dc6907d0d6d296","content": "# Zephyr SDK Documentation\n\n> Documentation for the Zephyr SDK: installation, guides, API reference, and frequently asked questions for developers.\n\n## Zephyr SDK documentation\n\nZephyr is a small, dependency-light SDK for building event-driven services. These docs walk you through installing the SDK, writing your first handler, the full API reference, and answers to common questions from the community.\n\n## Start here\n\nNew to Zephyr? Begin with the installation instructions, then follow the guide to build a working service in about ten minutes. Experienced users can jump straight to the API reference.\n"},{"type": "markdown","filename": "markdown/install.md","media_type": "text/markdown","source_hash": "864f25f637e77d82","content": "# Install \u2014 Zephyr SDK\n\n> Install the Zephyr SDK with pip and verify your setup in under a minute on Linux, macOS, or Windows.\n\n## Installing Zephyr\n\nZephyr supports Python 3.11 and newer on Linux, macOS, and Windows. Install it from the package index and confirm the version to make sure everything is wired up correctly before you continue to the guide.\n\n```bash\npip install zephyr-sdk\nzephyr --version\n```\n\nIf the version prints without an error, you are ready to build your first handler in the guide.\n"},{"type": "markdown","filename": "markdown/guide.md","media_type": "text/markdown","source_hash": "48dd3daf08e468e9","content": "# Guide \u2014 Zephyr SDK\n\n> A step-by-step guide to building your first event-driven handler with the Zephyr SDK.\n\n## Your first Zephyr handler\n\nA handler is a function that receives an event and returns a result. Zephyr takes care of subscribing to the queue, decoding the payload, and retrying on failure, so your code stays focused on the logic that matters.\n\n## Define a handler\n\nDecorate a function with the handler registration and Zephyr will route matching events to it. Handlers can be synchronous or asynchronous, and the runtime picks the right execution model automatically.\n\n## Run the service\n\nStart the worker from the command line and it will connect, subscribe, and begin processing events immediately, reporting health on a local endpoint.\n"},{"type": "markdown","filename": "markdown/api.md","media_type": "text/markdown","source_hash": "a3f48377f4ce78b7","content": "# API Reference \u2014 Zephyr SDK\n\n> The Zephyr SDK API reference: handlers, the client, configuration options, and lifecycle hooks.\n\n## API reference\n\nThis reference lists the public surface of the Zephyr SDK. Everything not documented here is considered internal and may change between releases without notice, so build against these names only.\n\n## handler(event_type)\n\nRegister a function to receive events of a given type. Returns the wrapped function so it can be exported and tested directly.\n\n## Client.connect(url)\n\nOpen a connection to the broker and return a client you can use to publish events and query health.\n"},{"type": "markdown","filename": "markdown/faq.md","media_type": "text/markdown","source_hash": "7d8e443553ebc28c","content": "# FAQ \u2014 Zephyr SDK\n\n> Frequently asked questions about the Zephyr SDK: performance, compatibility, retries, and support.\n\n## Frequently asked questions\n\n## Does Zephyr support async handlers?\n\nYes. Handlers may be synchronous or asynchronous, and the runtime detects which model to use and schedules work accordingly without any extra configuration on your part.\n\n## What happens when a handler fails?\n\nZephyr retries failed events with exponential backoff and, after the configured limit, moves them to a dead-letter queue so nothing is silently lost.\n"},{"type": "markdown_index","filename": "markdown/index.json","media_type": "application/json","source_hash": "84c85d33a0e7ec68","content": "{\n \"origin\": \"https://helpstack.example\",\n \"pages\": [\n {\n \"url\": \"https://helpstack.example\",\n \"title\": \"Zephyr SDK Documentation\",\n \"path\": \"markdown/index.md\",\n \"words\": 69,\n \"source_hash\": \"73dc6907d0d6d296\"\n },\n {\n \"url\": \"https://helpstack.example/install.html\",\n \"title\": \"Install \u2014 Zephyr SDK\",\n \"path\": \"markdown/install.md\",\n \"words\": 60,\n \"source_hash\": \"864f25f637e77d82\"\n },\n {\n \"url\": \"https://helpstack.example/guide.html\",\n \"title\": \"Guide \u2014 Zephyr SDK\",\n \"path\": \"markdown/guide.md\",\n \"words\": 101,\n \"source_hash\": \"48dd3daf08e468e9\"\n },\n {\n \"url\": \"https://helpstack.example/api.html\",\n \"title\": \"API Reference \u2014 Zephyr SDK\",\n \"path\": \"markdown/api.md\",\n \"words\": 75,\n \"source_hash\": \"a3f48377f4ce78b7\"\n },\n {\n \"url\": \"https://helpstack.example/faq.html\",\n \"title\": \"FAQ \u2014 Zephyr SDK\",\n \"path\": \"markdown/faq.md\",\n \"words\": 63,\n \"source_hash\": \"7d8e443553ebc28c\"\n }\n ]\n}"},{"type": "jsonld","filename": "jsonld-suggestions.json","media_type": "application/ld+json","source_hash": "aefaec1088452205","content": "{\n \"origin\": \"https://helpstack.example\",\n \"suggestions\": [\n {\n \"url\": \"https://helpstack.example\",\n \"jsonld\": {\n \"@context\": \"https://schema.org\",\n \"url\": \"https://helpstack.example\",\n \"name\": \"Zephyr SDK Documentation\",\n \"description\": \"Documentation for the Zephyr SDK: installation, guides, API reference, and frequently asked questions for developers.\",\n \"@type\": \"WebSite\"\n }\n },\n {\n \"url\": \"https://helpstack.example/install.html\",\n \"jsonld\": {\n \"@context\": \"https://schema.org\",\n \"url\": \"https://helpstack.example/install.html\",\n \"name\": \"Install \u2014 Zephyr SDK\",\n \"description\": \"Install the Zephyr SDK with pip and verify your setup in under a minute on Linux, macOS, or Windows.\",\n \"@type\": \"Article\",\n \"headline\": \"Install \u2014 Zephyr SDK\"\n }\n },\n {\n \"url\": \"https://helpstack.example/guide.html\",\n \"jsonld\": {\n \"@context\": \"https://schema.org\",\n \"url\": \"https://helpstack.example/guide.html\",\n \"name\": \"Guide \u2014 Zephyr SDK\",\n \"description\": \"A step-by-step guide to building your first event-driven handler with the Zephyr SDK.\",\n \"@type\": \"Article\",\n \"headline\": \"Guide \u2014 Zephyr SDK\"\n }\n },\n {\n \"url\": \"https://helpstack.example/api.html\",\n \"jsonld\": {\n \"@context\": \"https://schema.org\",\n \"url\": \"https://helpstack.example/api.html\",\n \"name\": \"API Reference \u2014 Zephyr SDK\",\n \"description\": \"The Zephyr SDK API reference: handlers, the client, configuration options, and lifecycle hooks.\",\n \"@type\": \"Article\",\n \"headline\": \"API Reference \u2014 Zephyr SDK\"\n }\n },\n {\n \"url\": \"https://helpstack.example/faq.html\",\n \"jsonld\": {\n \"@context\": \"https://schema.org\",\n \"url\": \"https://helpstack.example/faq.html\",\n \"name\": \"FAQ \u2014 Zephyr SDK\",\n \"description\": \"Frequently asked questions about the Zephyr SDK: performance, compatibility, retries, and support.\",\n \"@type\": \"FAQPage\",\n \"mainEntity\": [\n {\n \"@type\": \"Question\",\n \"name\": \"Does Zephyr support async handlers?\",\n \"acceptedAnswer\": {\n \"@type\": \"Answer\",\n \"text\": \"Yes. Handlers may be synchronous or asynchronous, and the runtime detects which model to use and schedules work accordingly without any extra configuration on your part.\"\n }\n },\n {\n \"@type\": \"Question\",\n \"name\": \"What happens when a handler fails?\",\n \"acceptedAnswer\": {\n \"@type\": \"Answer\",\n \"text\": \"Zephyr retries failed events with exponential backoff and, after the configured limit, moves them to a dead-letter queue so nothing is silently lost.\"\n }\n }\n ]\n }\n }\n ]\n}"},{"type": "manifest","filename": "manifest.json","media_type": "application/json","source_hash": "b760bca0f7865644","content": "{\n \"origin\": \"https://helpstack.example\",\n \"start_url\": \"https://helpstack.example\",\n \"pages_crawled\": 5,\n \"artifacts\": [\n {\n \"type\": \"llms_txt\",\n \"filename\": \"llms.txt\",\n \"media_type\": \"text/plain\",\n \"source_hash\": \"c5ee7835b86f8c48\"\n },\n {\n \"type\": \"markdown\",\n \"filename\": \"markdown/index.md\",\n \"media_type\": \"text/markdown\",\n \"source_hash\": \"73dc6907d0d6d296\"\n },\n {\n \"type\": \"markdown\",\n \"filename\": \"markdown/install.md\",\n \"media_type\": \"text/markdown\",\n \"source_hash\": \"864f25f637e77d82\"\n },\n {\n \"type\": \"markdown\",\n \"filename\": \"markdown/guide.md\",\n \"media_type\": \"text/markdown\",\n \"source_hash\": \"48dd3daf08e468e9\"\n },\n {\n \"type\": \"markdown\",\n \"filename\": \"markdown/api.md\",\n \"media_type\": \"text/markdown\",\n \"source_hash\": \"a3f48377f4ce78b7\"\n },\n {\n \"type\": \"markdown\",\n \"filename\": \"markdown/faq.md\",\n \"media_type\": \"text/markdown\",\n \"source_hash\": \"7d8e443553ebc28c\"\n },\n {\n \"type\": \"markdown_index\",\n \"filename\": \"markdown/index.json\",\n \"media_type\": \"application/json\",\n \"source_hash\": \"84c85d33a0e7ec68\"\n },\n {\n \"type\": \"jsonld\",\n \"filename\": \"jsonld-suggestions.json\",\n \"media_type\": \"application/ld+json\",\n \"source_hash\": \"aefaec1088452205\"\n }\n ],\n \"pages\": [\n {\n \"url\": \"https://helpstack.example\",\n \"source_hash\": \"73dc6907d0d6d296\"\n },\n {\n \"url\": \"https://helpstack.example/install.html\",\n \"source_hash\": \"864f25f637e77d82\"\n },\n {\n \"url\": \"https://helpstack.example/guide.html\",\n \"source_hash\": \"48dd3daf08e468e9\"\n },\n {\n \"url\": \"https://helpstack.example/api.html\",\n \"source_hash\": \"a3f48377f4ce78b7\"\n },\n {\n \"url\": \"https://helpstack.example/faq.html\",\n \"source_hash\": \"7d8e443553ebc28c\"\n }\n ]\n}"}],"example": {
81 unmodified lines8283848586878889638 unmodified lines72872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977081 unmodified lines"detail": "There's no llms.txt, so agents get no machine-readable map of what matters on the site."}],"verdict": "Major AI crawlers are blocked \u2014 agents are shut out of this site."},"audit": {"origin": "https://shopfront.example","start_url": "https://shopfront.example",638 unmodified lines"not_detectable": 1}},"generated_at": "2026-07-05T08:58:52.647573Z"},"artifacts": [{"type": "llms_txt","filename": "llms.txt","media_type": "text/plain","source_hash": "2fcbff127e08ca1d","content": "# Northwind Analytics\n\n> Northwind Analytics turns operational data into clear dashboards and alerts, so operations teams can spot problems early and act with confidence.\n\n## Pages\n- [Northwind Analytics \u2014 Dashboards for Operations Teams](https://shopfront.example): Northwind Analytics turns operational data into clear dashboards and alerts, so operations teams can spot problems early and act with confidence.\n\n---\nGenerated by Legibl. Curate this file to control what agents see.\n"},{"type": "markdown","filename": "markdown/index.md","media_type": "text/markdown","source_hash": "42b9add4349efee6","content": "# Northwind Analytics \u2014 Dashboards for Operations Teams\n\n> Northwind Analytics turns operational data into clear dashboards and alerts, so operations teams can spot problems early and act with confidence.\n\n## Operational dashboards your whole team can read\n\nNorthwind Analytics connects to the systems your operations team already uses and turns their data into dashboards that anyone can read at a glance. Alerts fire before small problems become outages, and every metric links back to the underlying records.\n\n## Built for clarity\n\nEvery chart is designed to answer one question, so a manager can understand the state of the business in seconds without training. Drill down when you need detail, or stay at the summary level for the morning stand-up.\n\n## Alerts that matter\n\nNorthwind learns the normal range for each metric and only alerts when something is genuinely off, which keeps inboxes quiet and trust high. This page is well built, but robots.txt blocks AI crawlers, so agents cannot read any of it.\n"},{"type": "markdown_index","filename": "markdown/index.json","media_type": "application/json","source_hash": "a8a372f885984ee3","content": "{\n \"origin\": \"https://shopfront.example\",\n \"pages\": [\n {\n \"url\": \"https://shopfront.example\",\n \"title\": \"Northwind Analytics \u2014 Dashboards for Operations Teams\",\n \"path\": \"markdown/index.md\",\n \"words\": 131,\n \"source_hash\": \"42b9add4349efee6\"\n }\n ]\n}"},{"type": "jsonld","filename": "jsonld-suggestions.json","media_type": "application/ld+json","source_hash": "4a5a7fdb1ac2f092","content": "{\n \"origin\": \"https://shopfront.example\",\n \"suggestions\": [\n {\n \"url\": \"https://shopfront.example\",\n \"jsonld\": {\n \"@context\": \"https://schema.org\",\n \"@type\": \"Organization\",\n \"name\": \"Northwind Analytics\",\n \"url\": \"https://shopfront.example/\"\n }\n }\n ]\n}"},{"type": "manifest","filename": "manifest.json","media_type": "application/json","source_hash": "2ec7ff2250da6bb5","content": "{\n \"origin\": \"https://shopfront.example\",\n \"start_url\": \"https://shopfront.example\",\n \"pages_crawled\": 1,\n \"artifacts\": [\n {\n \"type\": \"llms_txt\",\n \"filename\": \"llms.txt\",\n \"media_type\": \"text/plain\",\n \"source_hash\": \"2fcbff127e08ca1d\"\n },\n {\n \"type\": \"markdown\",\n \"filename\": \"markdown/index.md\",\n \"media_type\": \"text/markdown\",\n \"source_hash\": \"42b9add4349efee6\"\n },\n {\n \"type\": \"markdown_index\",\n \"filename\": \"markdown/index.json\",\n \"media_type\": \"application/json\",\n \"source_hash\": \"a8a372f885984ee3\"\n },\n {\n \"type\": \"jsonld\",\n \"filename\": \"jsonld-suggestions.json\",\n \"media_type\": \"application/ld+json\",\n \"source_hash\": \"4a5a7fdb1ac2f092\"\n }\n ],\n \"pages\": [\n {\n \"url\": \"https://shopfront.example\",\n \"source_hash\": \"42b9add4349efee6\"\n }\n ]\n}"}],"example": {81 unmodified lines828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157638 unmodified lines79679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783881 unmodified lines"detail": "There's no llms.txt, so agents get no machine-readable map of what matters on the site."}],"verdict": "Major AI crawlers are blocked \u2014 agents are shut out of this site.","mirror": {"human": {"host": "shopfront.example","title": "Northwind Analytics \u2014 Dashboards for Operations Teams","headings": ["Operational dashboards your whole team can read","Built for clarity","Alerts that matter"],"nav": ["Home"],"image_count": 1},"agent": [{"kind": "heading","text": "Operational dashboards your whole team can read"},{"kind": "text","text": "Northwind Analytics connects to the systems your operations team already uses and turns their data into dashboards that anyone can read at a glance. Alerts fire before small problems become outages, and every metric links back to the underlying records."},{"kind": "heading","text": "Built for clarity"},{"kind": "text","text": "Every chart is designed to answer one question, so a manager can understand the state of the business in seconds without training. Drill down when you need detail, or stay at the summary level for the morning stand-up."},{"kind": "heading","text": "Alerts that matter"},{"kind": "text","text": "Northwind learns the normal range for each metric and only alerts when something is genuinely off, which keeps inboxes quiet and trust high. This page is well built, but robots.txt blocks AI crawlers, so agents cannot read any of it."}],"ghosts": ["AI crawlers are locked out of this page."],"agent_words": 131},"top_problems": [{"id": "ai_bot_access","status": "fail","category": "Access"},{"id": "llms_txt","status": "fail","category": "Machine artifacts"},{"id": "sitemap","status": "fail","category": "Machine artifacts"},{"id": "sitemap_fresh","status": "fail","category": "Machine artifacts"}]},"cover_sheet": "# Your AI-Readiness Fix Kit \u2014 shopfront.example\n\n**Score: 0/100 (High risk).** This measures how well AI assistants\n(ChatGPT, Claude, Perplexity, Google AI) can read and use your website. Higher is better.\n\n## The top things to fix\n1. AI assistants are blocked from your site in robots.txt\n2. You don't have an AI welcome file (llms.txt)\n3. AI has no map of the pages on your site\n\n## What's in this kit (hand this to whoever runs your website)\n- **llms.txt** \u2014 your AI welcome file \u2014 upload it to your site root (yoursite.com/llms.txt)\n- **markdown/index.md** \u2014 a clean text copy of a page AI can read even when your site needs JavaScript\n- **markdown/index.json** \u2014 an index of those clean text pages\n- **jsonld-suggestions.json** \u2014 structured data telling AI what your business offers \u2014 paste into the page <head>\n- **manifest.json** \u2014 a summary of everything generated in this kit\n\n## How to check your work\nRe-run the free audit at https://legibl-app.hf.space after you publish these files.\n\n_Generated 2026-07-05 \u00b7 Legibl \u00b7 scoring spec 2.0.0._","audit": {"origin": "https://shopfront.example","start_url": "https://shopfront.example",638 unmodified lines"not_detectable": 1}},"generated_at": "2026-07-05T10:07:40.274402Z"},"artifacts": [{"type": "llms_txt","filename": "llms.txt","media_type": "text/plain","source_hash": "d6a53e79aac2ace8","content": "# Northwind Analytics\n\n> Northwind Analytics turns operational data into clear dashboards and alerts, so operations teams can spot problems early and act with confidence.\n\n## Pages\n- [Northwind Analytics \u2014 Dashboards for Operations Teams](https://shopfront.example): Northwind Analytics turns operational data into clear dashboards and alerts, so operations teams can spot problems early and act with confidence.\n\n---\nGenerated by Legibl. Curate this file to control what agents see.\n"},{"type": "markdown","filename": "markdown/index.md","media_type": "text/markdown","source_hash": "3d7fd2ac944e0021","content": "# Northwind Analytics \u2014 Dashboards for Operations Teams\n\n> Northwind Analytics turns operational data into clear dashboards and alerts, so operations teams can spot problems early and act with confidence.\n\n## Operational dashboards your whole team can read\n\nNorthwind Analytics connects to the systems your operations team already uses and turns their data into dashboards that anyone can read at a glance. Alerts fire before small problems become outages, and every metric links back to the underlying records.\n\n## Built for clarity\n\nEvery chart is designed to answer one question, so a manager can understand the state of the business in seconds without training. Drill down when you need detail, or stay at the summary level for the morning stand-up.\n\n## Alerts that matter\n\nNorthwind learns the normal range for each metric and only alerts when something is genuinely off, which keeps inboxes quiet and trust high. This page is well built, but robots.txt blocks AI crawlers, so agents cannot read any of it.\n"},{"type": "markdown_index","filename": "markdown/index.json","media_type": "application/json","source_hash": "6ef32a4377737e74","content": "{\n \"origin\": \"https://shopfront.example\",\n \"pages\": [\n {\n \"url\": \"https://shopfront.example\",\n \"title\": \"Northwind Analytics \u2014 Dashboards for Operations Teams\",\n \"path\": \"markdown/index.md\",\n \"words\": 131,\n \"source_hash\": \"3d7fd2ac944e0021\"\n }\n ]\n}"},{"type": "jsonld","filename": "jsonld-suggestions.json","media_type": "application/ld+json","source_hash": "dca1109267c66ea7","content": "{\n \"origin\": \"https://shopfront.example\",\n \"suggestions\": [\n {\n \"url\": \"https://shopfront.example\",\n \"jsonld\": {\n \"@context\": \"https://schema.org\",\n \"@type\": \"Organization\",\n \"name\": \"Northwind Analytics\",\n \"url\": \"https://shopfront.example/\"\n }\n }\n ]\n}"},{"type": "manifest","filename": "manifest.json","media_type": "application/json","source_hash": "cbb1c3a7d214429b","content": "{\n \"origin\": \"https://shopfront.example\",\n \"start_url\": \"https://shopfront.example\",\n \"pages_crawled\": 1,\n \"artifacts\": [\n {\n \"type\": \"llms_txt\",\n \"filename\": \"llms.txt\",\n \"media_type\": \"text/plain\",\n \"source_hash\": \"d6a53e79aac2ace8\"\n },\n {\n \"type\": \"markdown\",\n \"filename\": \"markdown/index.md\",\n \"media_type\": \"text/markdown\",\n \"source_hash\": \"3d7fd2ac944e0021\"\n },\n {\n \"type\": \"markdown_index\",\n \"filename\": \"markdown/index.json\",\n \"media_type\": \"application/json\",\n \"source_hash\": \"6ef32a4377737e74\"\n },\n {\n \"type\": \"jsonld\",\n \"filename\": \"jsonld-suggestions.json\",\n \"media_type\": \"application/ld+json\",\n \"source_hash\": \"dca1109267c66ea7\"\n }\n ],\n \"pages\": [\n {\n \"url\": \"https://shopfront.example\",\n \"source_hash\": \"3d7fd2ac944e0021\"\n }\n ]\n}"}],"example": {
2 unmodified lines34567891011121314151617181920212223242526272829303132333435363738394041423 unmodified lines4647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561572 unmodified lines<head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="Legibl audits whether AI agents can read and use your website β a deterministic 0β100 score with evidence for every check β then generates the machine-facing files (llms.txt, markdown mirror, JSON-LD) that fix it."><link rel="canonical" href="https://legibl-app.hf.space/"><meta property="og:type" content="website"><meta property="og:title" content="Legibl β Is your site ready for AI agents?"><meta property="og:description" content="A deterministic audit of your site's AI-agent readiness that also generates the files (llms.txt, markdown, JSON-LD) to fix it."><meta property="og:url" content="https://legibl-app.hf.space/"><title>Legibl β Is your site ready for AI agents?</title><link rel="stylesheet" href="/static/styles.css"><script type="application/ld+json">{"@context":"https://schema.org","@type":"SoftwareApplication","name":"Legibl","applicationCategory":"DeveloperApplication","operatingSystem":"Web","offers":{"@type":"Offer","price":"0","priceCurrency":"USD"},"description":"Deterministic audit of a website's AI-agent readiness that also generates the machine-facing files (llms.txt, markdown mirror, JSON-LD) to fix it. Independently implements the AgentReady standard.","author":{"@type":"Organization","name":"Legibl"}}</script></head><body><div class="wrap"><div class="topbar"><div class="brand">Legibl</div><a class="pill" id="selfTrust" href="#" title="Run Legibl on Legibl">Scores 100 on its own meter β check β</a></div><main><article><h1>See your website the way an AI agent sees it.</h1><p class="lede">AI assistants now answer your customers by <strong>reading your site</strong> β withoutrunning JavaScript and without filling in forms. Legibl shows you exactly what they can and can't read ofyours, then <strong>generates the files</strong> that fix it.</p><p class="whynow">Why it matters now: people increasingly ask an assistant instead of clicking through alist of search results β and an assistant can only recommend what it can actually read.</p><p class="sub">Enter a domain. Legibl scores whether agents can <strong>read and use</strong> itβ across access, renderability, structure, meaning, and machine artifacts β then generates the fixes(llms.txt, markdown mirror, JSON-LD). Not just a protocol checklist.</p><form id="form" class="panel"><div class="form-row"><div><label for="url">Website URL</label><input id="url" type="text" placeholder="https://example.com" inputmode="url" autocomplete="url"></div><div><label for="pages">Pages</label>3 unmodified lines<option value="25">25</option></select></div><button id="go" type="submit">Audit</button></div></form><div class="examples" id="examples"><span class="ex-label">New here? See a real audit with a gap:</span><div class="ex-chips" id="exChips"></div></div><div id="progress" class="panel hide"><div class="progress" id="progressText">Startingβ¦</div></div><div id="error" class="panel err hide"></div><div id="results" class="hide"><section class="panel agentview hide" id="agentViewPanel"><div class="av-head"><h2 id="avVerdict">What an AI agent actually reads</h2><span class="av-sub" id="avSub"></span></div><div class="av-grid"><div class="av-screen"><div class="av-screen-h">What the agent sees</div><pre id="avMarkdown"></pre></div><div class="av-misses"><div class="av-screen-h">What it misses</div><div id="avMisses"></div></div></div></section><section class="panel"><div class="scoreboard"><div class="score-card"><div class="score-num" id="scoreNum">--</div><div class="score-label" id="scoreLabel"></div></div><div><p class="site-title" id="siteTitle"></p><div class="meta-line" id="metaLine"></div><div class="bars" id="cats"></div></div></div></section><div class="grid2"><section class="panel"><h2>Site checks</h2><div id="siteChecks"></div></section><section class="panel"><h2>Action plan</h2><div id="recs"></div></section></div><section class="panel"><h2>Pages</h2><div id="pagesList"></div></section><section class="panel hide" id="conformancePanel"><div style="display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap"><h2 style="margin:0">Standards conformance</h2><span class="mini" id="confMeta"></span></div><p class="muted" id="confSub"></p><div id="conformance"></div></section><section class="panel"><div style="display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap"><h2 style="margin:0">Generated artifacts</h2><a class="dl" id="zip" href="#">Download all (.zip)</a></div><p class="muted">Preview of the generated <code>llms.txt</code>:</p><pre id="llms"></pre></section></div><section class="about"><h2>What Legibl checks</h2><p>Legibl crawls your site the way an AI agent does β without running JavaScript andfollowing your <code>robots.txt</code> β and scores five things that decide whether anagent can actually read and use your pages:</p><ul><li><strong>Access</strong> β can identified AI crawlers reach the content at all? This is a hard gate.</li><li><strong>Renderability</strong> β is the content present in the HTML without running JavaScript?</li><li><strong>Structure</strong> β semantic landmarks, a clean heading outline, and isolated main content.</li><li><strong>Meaning</strong> β titles, descriptions, canonical links, and schema.org data machines can read.</li><li><strong>Machine artifacts</strong> β an <code>llms.txt</code>, a fresh sitemap, and JSON-LD.</li></ul><h2>How it works</h2><ol><li>Enter a URL. Legibl crawls a few pages and scores them deterministically β no AI in the loop.</li><li>You get a 0β100 score with evidence for every check and a prioritized list of fixes.</li><li>Download the generated files β <code>llms.txt</code>, a markdown mirror, and JSON-LD β and ship them.</li></ol><p>Legibl also reports conformance to the<a href="https://www.agentready.org">AgentReady standard</a> alongside its own score.</p></section></article></main><p class="footer">Legibl β crawl, honest agent-readiness score, and generated agent-facing artifacts.Independently implements the <a href="https://www.agentready.org">AgentReady standard</a> (agentready.org).</p></div><script src="/static/app.js"></script></body></html>2 unmodified lines34567891011121314151617181920212223242526272829303132333435363 unmodified lines4041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761772 unmodified lines<head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="See your website the way AI sees it. Legibl shows you what AI assistants like ChatGPT can and can't read on your site β then builds a fix kit you can hand to whoever runs it."><link rel="canonical" href="https://legibl-app.hf.space/"><meta property="og:type" content="website"><meta property="og:title" content="What does AI see when it reads your website?"><meta property="og:description" content="AI assistants answer your customers by reading your site. Legibl shows you exactly what they see β and builds you a fix kit."><meta property="og:url" content="https://legibl-app.hf.space/"><title>Legibl β See your website the way AI sees it</title><link rel="stylesheet" href="/static/styles.css"><script type="application/ld+json">{"@context":"https://schema.org","@type":"SoftwareApplication","name":"Legibl","applicationCategory":"BusinessApplication","operatingSystem":"Web","offers":{"@type":"Offer","price":"0","priceCurrency":"USD"},"description":"Shows website owners what AI assistants can and can't read on their site, then generates a fix kit. Independently implements the AgentReady standard.","author":{"@type":"Organization","name":"Legibl"}}</script></head><body><div class="wrap"><div class="topbar"><div class="brand">Legibl</div><a class="pill" id="selfTrust" href="#" title="Run Legibl on Legibl">We score 100 on our own test β see it β</a></div><main><article><h1 id="hook">Someone is asking an AI about your business right now.</h1><p class="lede">AI assistants answer your customers by reading websites. Legibl shows you exactlywhat they see on yours β and what they miss.</p><form id="form" class="panel"><div class="form-row"><div><label for="url">Your website address</label><input id="url" type="text" placeholder="yourwebsite.com" inputmode="url" autocomplete="url"></div><div><label for="pages">Pages</label>3 unmodified lines<option value="25">25</option></select></div><button id="go" type="submit">Show me</button></div><p class="whynow">People increasingly ask an assistant instead of scrolling search results βand an assistant can only recommend what it can actually read.</p></form><div class="examples" id="examples"><span class="ex-label">Or watch it on a real site:</span><div class="ex-tiles" id="exTiles"></div></div><div id="progress" class="panel hide"><div class="progress" id="progressText">Startingβ¦</div></div><div id="error" class="panel err hide"></div><div id="results" class="hide"><!-- Beat 2: the mirror --><section class="panel mirror" id="mirrorPanel"><h2 class="beat-h">Your site β to a person, and to an AI</h2><div class="mirror-grid"><figure class="browser"><figcaption class="browser-bar"><span class="dots"><i></i><i></i><i></i></span><span class="addr" id="mHost"></span></figcaption><div class="browser-body" id="mHuman"></div><div class="frame-tag">What a person sees</div></figure><figure class="agentpane"><figcaption class="agent-bar">What the AI reads</figcaption><div class="agent-body" id="mAgent"></div><div class="frame-tag">What the AI sees</div></figure></div><p class="mirror-counter" id="mCounter"></p></section><!-- Beat 3: verdict --><section class="panel verdict" id="verdictPanel"><div class="verdict-top"><div class="score-ring" id="scoreRing"><span class="score-num" id="scoreNum">0</span><span class="score-den">/100</span></div><div class="verdict-words"><p class="verdict-line" id="verdictLine"></p><p class="verdict-site" id="verdictSite"></p></div></div><div class="problems" id="problems"></div><details class="cats-wrap"><summary>See the five things AI needs from your site</summary><div class="cats" id="cats"></div></details></section><!-- Beat 4: the fix-kit journey --><section class="panel fixkit" id="fixkitPanel"><div id="fixkitStart"><h2 class="beat-h">Fix it in one step</h2><p class="fixkit-sub">Legibl can build the files that make your site easy for AI to read βa kit you hand to whoever runs your website.</p><button id="genKit" type="button" class="big">Generate my fix kit</button></div><div id="fixkitProgress" class="hide"><ul class="stages" id="stages"></ul></div><div id="fixkitDone" class="hide"><div class="kit-card"><div class="kit-check">β</div><h3>Your fix kit is ready</h3><p>You don't need to understand these files. <strong>Hand this kit to whoever runs yourwebsite</strong> β it tells them exactly what to do.</p><a class="dl big" id="kitZip" href="#" download>Download the kit (.zip)</a><details class="cover-wrap"><summary>Preview the cover sheet</summary><pre id="coverSheet"></pre></details></div></div></section><!-- Beat 5: stakes forward --><section class="panel stakes" id="stakesPanel"><p class="stakes-line">Your site changes; so does your score. <strong>Re-check anytime</strong> β it's free.</p><div class="stakes-actions"><button id="recheck" type="button">Check another site</button><a class="tech-toggle" id="techToggle" href="#">Show the technical details</a></div></section><!--TECHNICAL-START--><div id="technicalView" class="hide"><section class="panel"><div class="scoreboard"><div class="score-card"><div class="score-num" id="tScoreNum">--</div><div class="score-label" id="tScoreLabel"></div></div><div><p class="site-title" id="tSiteTitle"></p><div class="meta-line" id="tMetaLine"></div><div class="bars" id="tCats"></div></div></div></section><div class="grid2"><section class="panel"><h2>Site checks</h2><div id="siteChecks"></div></section><section class="panel"><h2>Action plan</h2><div id="recs"></div></section></div><section class="panel"><h2>Pages</h2><div id="pagesList"></div></section><section class="panel hide" id="conformancePanel"><div class="conf-head"><h2 style="margin:0">Standards conformance</h2><span class="mini" id="confMeta"></span></div><p class="muted" id="confSub"></p><div id="conformance"></div><label class="na-toggle"><input type="checkbox" id="showNA"> Show not-applicable requirements</label></section><section class="panel"><div class="conf-head"><h2 style="margin:0">Generated artifacts</h2><a class="dl" id="zip" href="#">Download all (.zip)</a></div><p class="muted">Preview of the generated <code>llms.txt</code>:</p><pre id="llms"></pre></section></div><!--TECHNICAL-END--></div><section class="about"><h2>What Legibl looks at</h2><p>Legibl reads your site the way an AI assistant does β quickly, without a person clickingaround β and checks the five things that decide whether AI can actually use your pages:</p><ul><li><strong>Can AI reach you?</strong> Some sites accidentally block AI assistants at the door.</li><li><strong>Can AI see your content?</strong> If your pages need a browser to load, AI can see a blank.</li><li><strong>Can AI find its way around?</strong> Clear titles and structure help it navigate.</li><li><strong>Does AI understand what you offer?</strong> Your products and services need to be legible.</li><li><strong>Do you have AI-ready files?</strong> A few small files make your site far easier for AI to use.</li></ul><h2>How it works</h2><ol><li>Enter your website address. Legibl reads your pages the way an AI assistant does.</li><li>See exactly what AI can and can't read of yours β then get a plain-English score.</li><li>Generate a fix kit and hand it to whoever runs your website.</li></ol></section></article></main><p class="footer">Legibl shows you what AI assistants see on your site and builds you a fix kit.Independently implements the <a href="https://www.agentready.org">AgentReady standard</a> (agentready.org).</p></div><script src="/static/translations.js"></script><script src="/static/app.js"></script></body></html>
129 unmodified lines130131132129 unmodified lines.scoreboard, .grid2, .form-row, .av-grid { grid-template-columns: 1fr; }h1 { font-size: 30px; }}129 unmodified lines130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250129 unmodified lines.scoreboard, .grid2, .form-row, .av-grid { grid-template-columns: 1fr; }h1 { font-size: 30px; }}/* ===== L1-E story arc ===== */.beat-h { font-size: 20px; margin: 0 0 14px; }/* Beat 1 β example tiles as mini split-screens */.ex-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }.ex-tile { display: grid; gap: 10px; text-align: left; background: var(--card); border: 1px solid var(--line);border-radius: 12px; padding: 12px; cursor: pointer; box-shadow: none; color: var(--ink); }.ex-tile:hover { border-color: var(--accent); box-shadow: var(--shadow); }.tile-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; height: 74px; }.tile-human { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 8px;display: grid; gap: 5px; align-content: start; }.tile-human i { height: 6px; border-radius: 3px; background: #dfe4ee; display: block; }.tile-human i:nth-child(1) { width: 60%; height: 8px; background: #c3cadb; }.tile-human i:nth-child(2) { width: 92%; }.tile-human i:nth-child(3) { width: 74%; }.tile-agent { background: #0f1320; color: #7fe7c4; border-radius: 6px; padding: 8px;font: 11px/1.4 ui-monospace, Menlo, monospace; display: flex; align-items: center;justify-content: center; text-align: center; }.tile-agent.empty { color: #e0736b; }.tile-text b { font-size: 14px; display: block; }.tile-text span { font-size: 12px; color: var(--mut); }/* Beat 2 β the mirror */.mirror-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }.browser, .agentpane { margin: 0; border-radius: 10px; overflow: hidden;border: 1px solid var(--line); position: relative; background: #fff; }.browser-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px;background: #eef1f7; border-bottom: 1px solid var(--line); }.dots { display: inline-flex; gap: 4px; }.dots i { width: 9px; height: 9px; border-radius: 50%; background: #cfd6e4; display: block; }.addr { font-size: 12px; color: var(--mut); background: #fff; border-radius: 6px; padding: 3px 8px;flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.browser-body { padding: 16px; min-height: 220px; display: grid; gap: 9px; align-content: start; }.pg-nav { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }.pg-nav span { font-size: 11px; color: var(--mut); font-weight: 700; }.pg-title { font-size: 18px; font-weight: 900; }.pg-h1 { font-size: 16px; font-weight: 800; }.pg-h2 { font-size: 13px; font-weight: 700; color: #48506a; }.pg-img { height: 46px; border-radius: 6px; display: flex; align-items: center; justify-content: center;font-size: 12px; color: var(--mut);background: repeating-linear-gradient(45deg,#eef1f7,#eef1f7 8px,#e6eaf3 8px,#e6eaf3 16px); }.pg-bar { height: 8px; border-radius: 4px; background: #edf0f6; }.pg-bar:nth-of-type(even) { width: 92%; }.agentpane { background: #0f1320; border-color: #0f1320; }.agent-bar { padding: 8px 12px; background: #171c2c; color: #9fb0cf; font-size: 12px;font-weight: 800; letter-spacing: .03em; }.agent-body { padding: 16px; min-height: 220px; display: grid; gap: 8px; align-content: start;font: 12.5px/1.55 ui-monospace, Menlo, Consolas, monospace; color: #7fe7c4; }.agent-body.sparse { align-content: center; }.ag-h { color: #cfe8ff; font-weight: 700; }.ag-t { color: #86e8c6; opacity: .92; }.ag-ghost { color: #f0958d; background: rgba(224,115,107,.08);border: 1px dashed rgba(224,115,107,.5); border-radius: 6px; padding: 8px 10px; }.frame-tag { position: absolute; bottom: 8px; right: 10px; font-size: 10px; font-weight: 800;text-transform: uppercase; letter-spacing: .05em; color: var(--mut);background: rgba(255,255,255,.85); padding: 2px 7px; border-radius: 999px; }.agentpane .frame-tag { color: #9fb0cf; background: rgba(23,28,44,.85); }.mirror-counter { margin: 14px 0 0; font-size: 15px; font-weight: 700; }/* Beat 3 β verdict */.verdict-top { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }.score-ring { --c: var(--accent); --p: 0; width: 96px; height: 96px; border-radius: 50%;display: grid; place-items: center; flex: none; text-align: center;background: conic-gradient(var(--c) calc(var(--p) * 1%), #e7eaf3 0); }.score-ring::before { content: ""; position: absolute; width: 84px; height: 84px;background: var(--card); border-radius: 50%; }.score-num { position: relative; font-size: 34px; font-weight: 950; line-height: 1; }.score-den { position: relative; font-size: 11px; color: var(--mut); }.verdict-words { min-width: 0; }.verdict-line { font-size: 21px; font-weight: 800; margin: 0 0 4px; }.verdict-site { font-size: 13px; color: var(--mut); margin: 0; word-break: break-all; }.problems { display: grid; gap: 8px; margin: 16px 0; }.prob { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600;background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 11px 13px; }.prob-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }.prob-dot.bad { background: var(--bad); }.prob-dot.warn { background: var(--warn); }.prob-dot.ok { background: var(--good); }.cats-wrap summary { cursor: pointer; color: var(--mut); font-weight: 700; font-size: 13px; }.cats-wrap .cats { margin-top: 12px; display: grid; gap: 10px; }/* Beat 4 β fix kit */.fixkit-sub { color: var(--mut); max-width: 560px; }button.big, a.dl.big { font-size: 16px; padding: 14px 26px; display: inline-block; text-decoration: none; }a.dl.big { background: var(--accent); color: #fff; border-radius: 8px; font-weight: 900;box-shadow: 0 12px 28px rgba(47,109,246,.22); }.stages { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 10px; }.stage { display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--mut); opacity: .5; }.stage.active { color: var(--ink); opacity: 1; }.stage.done { color: var(--good); opacity: 1; }.stage .spin { width: 16px; height: 16px; border-radius: 50%; flex: none;border: 2px solid var(--line); border-top-color: var(--accent); }.stage.active .spin { animation: spin .7s linear infinite; }.stage.done .spin { border: 2px solid var(--good); background: var(--good); animation: none; }@keyframes spin { to { transform: rotate(360deg); } }.kit-card { text-align: center; padding: 8px; }.kit-check { width: 54px; height: 54px; border-radius: 50%; background: var(--good); color: #fff;font-size: 30px; font-weight: 900; display: grid; place-items: center; margin: 0 auto 10px; }.kit-card h3 { font-size: 22px; margin: 0 0 8px; }.kit-card p { color: var(--mut); max-width: 520px; margin: 0 auto 16px; }.cover-wrap { margin-top: 14px; text-align: left; }.cover-wrap summary { cursor: pointer; color: var(--mut); font-weight: 700; font-size: 13px; }/* Beat 5 β stakes + technical toggle */.stakes { text-align: center; }.stakes-line { font-size: 17px; margin: 0 0 14px; }.stakes-actions { display: flex; gap: 14px; justify-content: center; align-items: center; flex-wrap: wrap; }.tech-toggle { color: var(--mut); font-weight: 700; font-size: 13px; text-decoration: underline; }.na-toggle { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px;color: var(--mut); cursor: pointer; }.conf-head { display: flex; justify-content: space-between; align-items: center; gap: 12px;flex-wrap: wrap; margin-bottom: 4px; }#technicalView:not(.hide) { display: grid; gap: 16px; margin-top: 4px; }@media (max-width: 820px) {.mirror-grid { grid-template-columns: 1fr; }}
12345678910111213141516171819202122232425262728293031323334353637383940414243"use strict";// L1-E: consumer-language translations for the default (non-technical) view.// Keyed by scorespec check id / category name. The words a site owner reads are// theirs, not ours β never surface jargon here (see docs/l1e-story-arc-spec.md).const LEGIBL_T = { categories: { "Access": "Can AI reach you?", "Renderability": "Can AI see your content?", "Structure": "Can AI find its way around?", "Meaning": "Does AI understand what you offer?", "Machine artifacts": "Do you have AI-ready files?", }, // Plain-language phrasing for a failing/partial check. problems: { ai_bot_access: "AI assistants are blocked from your site at the front door", page_indexable: "This page asks search and AI engines not to list it", https: "Your site isn't served securely", http_status: "This page returned an error instead of loading", redirect_sanity: "Visitors and AI go through too many redirects to reach the page", response_time: "Your page is slow to respond", render_mode: "Your content is invisible to AI β only people running JavaScript see it", text_ratio: "There's very little readable text on the page for AI to find", noscript_fallback: "There's no backup content when JavaScript is switched off", semantic_landmarks: "AI can't tell your main content apart from menus and footers", heading_hierarchy: "Your headings don't form a clear outline AI can follow", single_h1: "The page is missing one clear main title", link_text: "Your links don't say where they lead", alt_text: "Your images have no descriptions AI can read", structured_data: "AI can't tell what your business offers", meta_description: "Your page has no short summary for AI to quote", canonical_og: "AI may not know which version of your page is the original", language: "Your page doesn't say what language it's written in", llms_txt: "You don't have an AI welcome file", sitemap: "AI has no map of the pages on your site", sitemap_fresh: "Your site map is out of date", }, categoryName(name) { return this.categories[name] || name; }, problem(id) { return this.problems[id] || "Something on this page is hard for AI to read"; },};2 unmodified lines34567877 unmodified lines86878889909172 unmodified lines1641651661671681697 unmodified lines17717817918018118218318418524 unmodified lines2102112122132142152 unmodified linesfrom collections.abc import Callablefrom dataclasses import dataclass, fieldfrom ..artifacts import generate_artifactsfrom ..contracts import Artifact, CrawlResult, JobEvent, SiteAudit77 unmodified lines)_READABLE_WORDS = 50 # a page below this yields almost nothing to an agentdef _page_markdown(page) -> str:"""Reconstruct the plain text an agent extracts from a page's main content."""72 unmodified lineselse:verdict = "An agent can read this site cleanly."return {"origin": crawl.origin,"words": words,7 unmodified lines"sample_markdown": _page_markdown(primary) if primary else "","misses": misses,"verdict": verdict,}def run_summary(run: AuditRun) -> dict:audit = run.auditerrors = run.crawl.errors24 unmodified linesreturn {"summary": run_summary(run),"agent_view": agent_view,"audit": run.audit.model_dump(mode="json"),"artifacts": [{2 unmodified lines34567891077 unmodified lines88899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214372 unmodified lines2162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622637 unmodified lines27127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131224 unmodified lines3373383393403413423432 unmodified linesfrom collections.abc import Callablefrom dataclasses import dataclass, fieldfrom datetime import datefrom urllib.parse import urlparsefrom ..artifacts import generate_artifactsfrom ..contracts import Artifact, CrawlResult, JobEvent, SiteAudit77 unmodified lines)_READABLE_WORDS = 50 # a page below this yields almost nothing to an agent# Plain-language phrasing for each scorespec check id (source of truth for the# fix-kit cover sheet; the UI mirrors these in static/translations.js). File# names like llms.txt are allowed here because the cover sheet IS the fix kit._PLAIN = {"ai_bot_access": "AI assistants are blocked from your site in robots.txt","page_indexable": "This page asks search and AI engines not to list it","https": "Your site isn't served securely over HTTPS","http_status": "This page returned an error instead of loading","redirect_sanity": "Visitors and AI go through too many redirects to reach the page","response_time": "Your page is slow to respond","render_mode": "Your content is invisible to AI β only people running JavaScript see it","text_ratio": "There's very little readable text on the page for AI to find","noscript_fallback": "There's no backup content when JavaScript doesn't run","semantic_landmarks": "AI can't tell your main content apart from menus and footers","heading_hierarchy": "Your headings don't form a clear outline AI can follow","single_h1": "The page is missing one clear main title","link_text": "Your links don't say where they lead","alt_text": "Your images have no descriptions AI can read","structured_data": "AI can't tell what your business offers","meta_description": "Your page has no short summary for AI to quote","canonical_og": "AI may not know which version of your page is the original","language": "Your page doesn't say what language it's written in","llms_txt": "You don't have an AI welcome file (llms.txt)","sitemap": "AI has no map of the pages on your site","sitemap_fresh": "Your site map is out of date",}_FILE_ROLE = {"llms_txt": "your AI welcome file β upload it to your site root (yoursite.com/llms.txt)","markdown": "a clean text copy of a page AI can read even when your site needs JavaScript","markdown_index": "an index of those clean text pages","jsonld": "structured data telling AI what your business offers β paste into the page <head>","manifest": "a summary of everything generated in this kit",}def _top_problems(audit: SiteAudit) -> list[dict]:"""Failing/partial checks, worst first, one entry per check id."""best: dict[str, dict] = {}for c in audit.all_checks():if c.status == "pass":continuesev = 2 if c.status == "fail" else 1cur = best.get(c.id)if cur is None or (sev, c.weight) > (cur["sev"], cur["weight"]):best[c.id] = {"id": c.id, "status": c.status, "category": c.category,"weight": c.weight, "sev": sev}ranked = sorted(best.values(), key=lambda x: (x["sev"], x["weight"]), reverse=True)return [{"id": r["id"], "status": r["status"], "category": r["category"]} for r in ranked]def _page_markdown(page) -> str:"""Reconstruct the plain text an agent extracts from a page's main content."""72 unmodified lineselse:verdict = "An agent can read this site cleanly."# Beat 2 (L1-E): the split-screen mirror β a human-side hint and the agent's# text stream, with ghost markers computed only from real evidence.host = urlparse(crawl.origin).netloc or urlparse(crawl.start_url).netloc or crawl.originagent_stream: list[dict] = []if primary is not None:for b in primary.blocks:if b.kind == "heading" and b.text:agent_stream.append({"kind": "heading", "text": b.text})elif b.kind == "paragraph" and b.text:agent_stream.append({"kind": "text", "text": b.text})elif b.kind == "list" and b.items:agent_stream.append({"kind": "text", "text": "β’ " + " Β· ".join(b.items[:5])})if len(agent_stream) >= 14:breakghosts: list[str] = []if primary is not None and primary.render_mode == "js-dependent":ghosts.append("This whole area is invisible to AI β it only appears once JavaScript runs.")imgs_no_alt_primary = sum(1 for img in (primary.images if primary else []) if not img.alt.strip())if imgs_no_alt_primary:ghosts.append(f"{imgs_no_alt_primary} image(s) with no description β AI can't see what's inside them.")if blocked:ghosts.append("AI crawlers are locked out of this page.")mirror = {"human": {"host": host,"title": primary.title if primary else "","headings": [h.text for h in primary.headings[:3]] if primary else [],"nav": [ln.text.strip() for ln in (primary.links if primary else [])if ln.text.strip()][:6],"image_count": len(primary.images) if primary else 0,},"agent": agent_stream,"ghosts": ghosts,"agent_words": primary.word_count if primary else 0,}return {"origin": crawl.origin,"words": words,7 unmodified lines"sample_markdown": _page_markdown(primary) if primary else "","misses": misses,"verdict": verdict,"mirror": mirror,"top_problems": _top_problems(run.audit),}def _cover_sheet(run: AuditRun) -> str:"""A plain-language cover sheet for the fix kit β the deliverable a siteowner hands to whoever runs their website (doubles as an agency report)."""a = run.audithost = urlparse(a.origin).netloc or a.origintop = _top_problems(a)[:3]out: list[str] = [f"# Your AI-Readiness Fix Kit β {host}","",f"**Score: {a.score}/100 ({a.score_label}).** This measures how well AI assistants","(ChatGPT, Claude, Perplexity, Google AI) can read and use your website. Higher is better.","","## The top things to fix",]if top:out += [f"{i}. {_PLAIN.get(p['id'], p['id'])}" for i, p in enumerate(top, 1)]else:out.append("Nothing major β your site already reads cleanly for AI.")out += ["", "## What's in this kit (hand this to whoever runs your website)"]for art in run.artifacts:out.append(f"- **{art.filename}** β {_FILE_ROLE.get(art.type, 'a supporting file')}")out += ["","## How to check your work","Re-run the free audit at https://legibl-app.hf.space after you publish these files.","",f"_Generated {date.today().isoformat()} Β· Legibl Β· scoring spec {a.scorespec_version}._",]return "\n".join(out)def run_summary(run: AuditRun) -> dict:audit = run.auditerrors = run.crawl.errors24 unmodified linesreturn {"summary": run_summary(run),"agent_view": agent_view,"cover_sheet": _cover_sheet(run),"audit": run.audit.model_dump(mode="json"),"artifacts": [{
src/legibl/api/server.py+24-7
src/legibl/api/static/app.js+207-82
src/legibl/api/static/examples/flowboard.json+87-10
src/legibl/api/static/examples/helpstack.json+81-15
src/legibl/api/static/examples/shopfront.json+77-9
src/legibl/api/static/index.html+112-92
src/legibl/api/static/styles.css+118
src/legibl/api/static/translations.jsAdded+43
src/legibl/service/orchestrate.py+128