Repository navigation
feat: llms.txt for AI agents, plus five docs-site fixes (0.1.17-alpha) - #39
Merged
Merged
Conversation
…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
marked this pull request as ready for review
October 14, 2026 08:30
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.
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.txtlists every page with its description, grouped by sidebar section./llms-full.txthas 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.mdand a Cursor rule are served as downloads underagents/. Each is a## {SiteName}section, so it can be appended to an existing file.Summary,RulesFile(shown at the top),InstallCommandPattern(a regex; the first match in a page's code blocks is listed after it),AgentFiles,PageActions.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 useSiteUrl, or the request's address..mdlinks. Tags inside code fences are left alone.shelldocs.jsdrives it, so it works in static exports..txtand.mdfiles load the file instead of the docs' "Page not found".shelldocs buildwrites all the files into the export. Links use--site-url, thenSiteUrl, otherwise they're root-relative under--base-href.shelldocs initturns it on. The example site uses it and has an llms.txt page. It's documented in the README and ARCHITECTURE.Fixes
razor:previewfences that hold only HTML render live.404.htmlshows the visitor's path instead of the probe URL.LogoSvglogos are sized toLogoHeight.HomeLayoutincludes<SearchDialog />.Checked
.mdreturning 404, the converted pages, the menu and the chat links. A.mdlink loads the file while the Blazor circuit is running.python -m http.server: 44 llms files written with root-relative links. The menu, Copy page and View as Markdown work, and the/llms.txtlink loads the file.