Skip to content

feat: llms.txt for AI agents, plus five docs-site fixes (0.1.17-alpha) - #39

Merged
Shewart merged 11 commits into
mainfrom
fix/docs-site-findings
Oct 14, 2026
Merged

Shewart merged 11 commits into
mainfrom
fix/docs-site-findings

Conversation

@Shewart

@Shewart Shewart commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

llms.txt for AI agents

o.EnableLlmsTxt(l => ...) publishes a ShellDocs site for coding agents (ported from the ShellUI docs site and made generic):

  • /llms.txt lists every page with its description, grouped by sidebar section. /llms-full.txt has every page as Markdown. Each page is also served as Markdown at its URL + .md. Each version root gets the same files.
  • AGENTS.md, CLAUDE.md, copilot-instructions.md and a Cursor rule are served as downloads under agents/. Each is a ## {SiteName} section, so it can be appended to an existing file.
  • Options: Summary, RulesFile (shown at the top), InstallCommandPattern (a regex; the first match in a page's code blocks is listed after it), AgentFiles, PageActions.
  • The files are served as text/plain, and the agent files as downloads. Middleware answers these paths before routing, so they don't clash with the docs page route. Links use SiteUrl, or the request's address.
  • ShellDocs tags become Markdown: demos become their source, callouts become blockquotes (fences inside are kept), tabs get a bold label per tab, and cards become a list. Steps, file trees and type tables are converted too. Other registered components become their text. Links to docs pages become absolute .md links. Tags inside code fences are left alone.
  • A ⋯ menu by the page title: Copy page, View as Markdown, Open in Claude, Open in ChatGPT. shelldocs.js drives it, so it works in static exports.
  • Links to .txt and .md files load the file instead of the docs' "Page not found".
  • shelldocs build writes all the files into the export. Links use --site-url, then SiteUrl, otherwise they're root-relative under --base-href.
  • shelldocs init turns it on. The example site uses it and has an llms.txt page. It's documented in the README and ARCHITECTURE.

Fixes

  • The missing-tab note keeps its spaces.
  • razor:preview fences that hold only HTML render live.
  • 404.html shows the visitor's path instead of the probe URL.
  • LogoSvg logos are sized to LogoHeight.
  • HomeLayout includes <SearchDialog />.

Checked

  • Every commit builds in Release with 0 warnings and passes its tests on its own. 367 tests in total, 12 new, including one that converts every Docs* tag and one that fails if a built-in component has no Markdown form.
  • Example site: the endpoints, content types, the download header, an unknown .md returning 404, the converted pages, the menu and the chat links. A .md link loads the file while the Blazor circuit is running.
  • Static export served by python -m http.server: 44 llms files written with root-relative links. The menu, Copy page and View as Markdown work, and the /llms.txt link loads the file.
  • Copy page was checked with a stubbed clipboard, because the test browser wasn't focused.

Shewart and others added 11 commits October 14, 2026 07:16
…ents

o.EnableLlmsTxt(l => ...) serves /llms.txt, /llms-full.txt, the same under
each version root, each page at its URL + ".md", and AGENTS.md, CLAUDE.md,
copilot-instructions.md and a Cursor rule under agents/. ShellDocs tags
become Markdown; links to docs pages become absolute .md links.
With EnableLlmsTxt, a ⋯ menu next to the page title offers Copy page,
View as Markdown, Open in Claude and Open in ChatGPT. shelldocs.js drives
it, so it works in static exports. Links to .txt and .md files on the site
now load the file instead of the docs' "Page not found".
shelldocs build reads the app's file list (/_shelldocs/llms.json) and
writes llms.txt, llms-full.txt, every page's .md and the agent files.
Links use --site-url, then SiteUrl, else they're root-relative under
--base-href.
README and ARCHITECTURE sections, a page on the example site with its own
rules file, and o.EnableLlmsTxt() in the Program.cs that shelldocs init
writes. The example docs use the ShellUI and ShellDocs sites' real details.
@Shewart Shewart changed the title fix: findings from the docs site (0.1.17-alpha) feat: llms.txt for AI agents, plus five docs-site fixes (0.1.17-alpha) Oct 14, 2026
@Shewart
Shewart marked this pull request as ready for review October 14, 2026 08:30
@Shewart
Shewart merged commit 53c675b into main Oct 14, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant