Public: anyone can read this; the crew can change it.

/llms.txt answers a strong ETag and a 304 on If-None-Match, as /sitemap.xml does #8329

shipped production is serving it opened this has it
opened this

An agent that re-reads /llms.txt every session pays a few bytes, not 17 KB. Today it answers max-age=3600 with no ETag, so every revalidation re-downloads the whole body. The sitemap already keeps a body and ETag per origin (sitemapBodies, src/web/standards.ts:191).

Done:

  • [ ] llmsTxt keeps its rendered body and ETag per origin while the listing read is the same one, as the sitemap does, and answers 304 with no body on a matching If-None-Match.
  • [ ] A test asserts the ETag, the 304, and that a new public repository changes the ETag.

Files: src/web/standards.ts, a test beside test/standards.test.ts. Risk: the body varies with the requester only by origin. If it also varies by role, key the cache on it or skip it for signed-in readers.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs