feat: add llms.txt support - #37
Open
wellkilo wants to merge 1 commit into
Open
Conversation
Add canonical llms.txt and llms-full.txt files for AI assistant consumption. Publish synchronized copies through docs/public so the VitePress site serves both files at the site root. Add llms:build and llms:check scripts plus a GitHub Actions guard to keep generated copies in sync. Change-Id: I60d48a27634df5ac783b882022ed81c78e9e7af6 Verification: npm run llms:check && npm run docs:build.
Author
Contributor
|
检查结论:PR #37 当前还不能直接合并,主要内容需要更新后再复核。\n\n我对当前仓库结构做了本地核对:\n- 当前是 13 个 Lecture、7 个 Project、15 个语言入口,不是 PR 描述中的 12/6。\n- Lecture 03、04、09 等旧路径确实不存在,实际路径分别是:\n - docs/en/lectures/lecture-03-why-the-repository-must-become-the-system-of-record/index.md\n - docs/en/lectures/lecture-04-why-one-giant-instruction-file-fails/index.md\n - docs/en/lectures/lecture-09-why-agents-declare-victory-too-early/index.md\n- Lecture 13 和 Project 07 也需要纳入索引。\n- llms-full.txt 中 Lecture 09/10 仍由 Issue #2 跟踪的说法已经过时,应删除。\n- 当前脚本只是把根目录的 llms.txt / llms-full.txt 同步到 docs/public/,不会根据课程内容生成摘要,因此维护说明需要改为“人工维护源文件,脚本负责同步和校验”。\n\n建议先按当前仓库目录修正 llms.txt、llms-full.txt 以及同步/校验脚本,再重新发起检查。修正后应至少验证所有链接路径、docs/public 镜像一致性、git diff --check 和 VitePress 构建。 |
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.
PR: Add
/llms.txtand/llms-full.txt(closes #34)Closes #34.
What this PR does
Adds an
llmstxt.org-compliantllms.txt(curated index) and anllms-full.txt(expanded one-shot context bundle) so LLM-powered tools — coding agents, IDE chat plugins, doc-aware search — can ingest the course without crawling the whole VitePress site.Both files are authored at the repo root (the spec-required location) and copied into
docs/public/so VitePress serves them at the site root. A tiny generator script keeps the two copies in sync, and a CI workflow fails the build if they drift.Files
llms.txt## Optional).llms-full.txtdocs/public/llms.txthttps://walkinglabs.github.io/learn-harness-engineering/llms.txt.docs/public/llms-full.txthttps://walkinglabs.github.io/learn-harness-engineering/llms-full.txt.scripts/build-llms-txt.mjs--checkmode used by CI.package.jsonllms:build/llms:checkscripts; chainllms:buildintodocs:build..github/workflows/llms-txt-check.ymlREADME.mdllms.txt)" section after the Skills section.Why this matters
llms.txtis on-brand and lowers the friction for agents that want to reference the course mid-task.docs/public/(not only at the repo root) ensures bothgithub.com/.../llms.txtand the hosted site URL work — most agents check the site URL.How I verified
node scripts/build-llms-txt.mjslocally — both files land indocs/public/with matching byte counts.--checkagainst a freshly synced tree — exit 0; mutated one file and re-ran — exit 1 with a clear drift message.llms.txtagainst the llmstxt.org spec (H1, blockquote summary, sections of markdown lists,## Optionalsection semantics).docs/.vitepress/config.mtssidebar tree.Out of scope (intentionally deferred)
llms-full.txtfrom lecture frontmatter. Doable, but adds a parser and risks summary drift. Current approach is a hand-curated bundle whose only sync requirement is "copy two files todocs/public/" — caught by CI.llms.txt. The spec is silent on i18n; the English bundle already points at every locale README under## Optional. Happy to add if maintainers want it.llms-full.txtnotes their tracked status.Reviewer checklist
npm run llms:buildproduces no diff after running it twice in a row.npm run docs:buildstill succeeds end-to-end (the new step isllms:buildrunning beforevitepress build docs).Content-Type: text/plainortext/markdown:https://walkinglabs.github.io/learn-harness-engineering/llms.txthttps://walkinglabs.github.io/learn-harness-engineering/llms-full.txt