Add machine-readable agent discovery - #149
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Public web agents can reach Tempo Immaterial, but the homepage only serves HTML and the site does not publish an XML sitemap or agent-specific orientation file. That makes it harder for source-blind clients to identify Alice, discover canonical public content, and consume a concise representation without application markup.
The original readiness audit also suggested adding more homepage prose and trust pages. Those changes are deliberately excluded: this PR does not alter the ordinary human-facing homepage or 404 experience.
Approach
Add a machine-only discovery layer around the existing SvelteKit site. Browsers continue receiving the existing homepage HTML, while clients that explicitly prefer Markdown can receive a concise representation of that same canonical resource. Build-time endpoints expose an agent guide and a content-derived sitemap, and invisible head metadata makes the site's personal identity explicit.
The negotiation boundary is intentionally limited to the homepage. Expanding Markdown representations across prerendered writing and interactive studio routes remains a separate product and architecture decision.
What changed
Acceptpreferences with q-values, specificity, wildcards, and explicit exclusions, then serve homepage HTML, Markdown, or406 Not Acceptableas appropriate.GETandHEAD; non-GET requests still reach the existing route behavior.Vary: Acceptto both homepage representations so downstream caches can distinguish them./llms.txtwith specific when-to-use guidance, canonical links, and explicit capability limits./sitemap.xmlfrom public static routes and authored content metadata, excluding owner, authentication, API, unsubscribe, legacy-alias, and experimental arcade surfaces.lastmod, omitting missing or invalid evidence rather than normalizing impossible dates.Safety and operations
This is an additive, reversible HTTP/content change with no data writes, credentials, migrations, tracking, or new visible interface. The primary operational risk is cache variation at Vercel's edge. The exact protected preview demonstrates that HTML and Markdown remain separated regardless of which representation primes the cache.
Verification
pnpm check,pnpm lint,pnpm build, and all 36 unit tests pass. Together they validate the Svelte/TypeScript boundary, formatting, production build, Accept selection, and strict sitemap-date behavior.POST /remains405, metadata is parseable, machine files resolve, and existing keyboard/reduced-motion/navigation behavior does not regress.bbc1661.Vary: Accept; Markdown HEAD returns no body; unsupported GET/HEAD return406; and Markdown-preferred POST remains405./llms.txtand/sitemap.xmlresolve on the preview. The sitemap contains 53 intended public URLs, leaks no excluded routes, and every listed URL resolves successfully.bbc1661head changes no reviewed implementation or test bytes after94e1411and introduces no technical blocker.Review focus
Varybehavior are appropriate for the Vercel cache boundary.llms.txtdescriptions are accurate without implying an API or authority to act for Alice.Follow-ups