From 04f3381d8e54bc7cfa257e510f085c33654ebfc2 Mon Sep 17 00:00:00 2001 From: Mathieu Tarral Date: Thu, 4 Jun 2026 09:02:30 -0700 Subject: [PATCH] docs: generate llms-full.txt for LLM accessibility (fixes #355) Add a single shell step after `mdbook build` that concatenates all doc pages in SUMMARY.md order into book/html/llms-full.txt. This file is served at /llms-full.txt and allows LLMs to ingest the full TSFFS docs in one request without crawling individual pages. Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/docs.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 0fa121c4..e9ab8e77 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -57,6 +57,13 @@ jobs: run: | pushd docs || exit 1 mdbook build + # Generate llms-full.txt: a single concatenated Markdown file of all docs + # in SUMMARY.md order, for LLM consumption (see https://llmstxt.org/). + # Extracts .md paths from SUMMARY.md links, then concatenates each file + # with a blank line separator. Output is served at /llms-full.txt. + grep -oP '\([^)]+\.md\)' src/SUMMARY.md | tr -d '()' | while read -r f; do + echo; cat "src/$f" + done > book/html/llms-full.txt popd || exit 1 - name: Cache SIMICS Dependencies