Skip to content

LOU-D12: llms.txt, llms-full.txt and docs shipped in the npm package - #51

Merged
LinuxDevil merged 4 commits into
mainfrom
lou-d12-llms-txt
Oct 1, 2026
Merged

LinuxDevil merged 4 commits into
mainfrom
lou-d12-llms-txt

Conversation

@LinuxDevil

Copy link
Copy Markdown
Owner

What

  • scripts/generate-llms-txt.ts (+ pure helpers in scripts/llmsTxt.ts, 16 unit tests) generates llms.txt (llmstxt.org layout: Docs / Examples / Optional, absolute GitHub URLs from package.json repository.url) and llms-full.txt (README, then installation, quick-start, api-overview, rest alphabetical; each under # Title + Source: line; relative links made absolute; HTML comments and badges stripped).
  • npm scripts docs:llms and docs:llms:check; the check runs in CI next to the docs snippet check and prints "llms.txt is stale: run npm run docs:llms".
  • package.json files now ships llms.txt, llms-full.txt, docs/*.md (minus docs/eslint-baseline-followup.md; research/plan are in subdirs so never matched).
  • README: "For AI coding agents" section. No AGENTS.md (out of scope).
  • Generated files are committed.

Why

Agents should be able to read the docs from node_modules, and the files must not go stale.

How verified

  • npm pack --dry-run: includes docs/agent-forge.md api-overview.md configuration.md deployment.md installation.md quick-start.md testing.md, llms-full.txt (88.5kB), llms.txt (3.8kB); no docs/research, docs/plan, docs/eslint-baseline-followup.md. total files: 152
  • npx tsc --noEmit clean; npm run lint: 0 errors (434 warnings, none from this change; src/ untouched)
  • both builds OK; npm run test:coverage: 99 files passed, 1301 tests passed, 3 skipped
  • npm run fallow exit 0 (fixed 2 unused exports along the way)
  • npm run docs:verify-snippets: all 33 snippets type-check, 5 run
  • docs:llms:check exits 0 on fresh output and 1 with the stale message after tampering

Notes for reviewer

  • Merged origin/main before final verification: it was already up to date (no new commits).
  • COORDINATOR: after merging other PRs that touch README/docs, run npm run docs:llms and commit llms.txt/llms-full.txt (do not hand-resolve conflicts in them); CI will fail otherwise.
  • Descriptions are auto-extracted (first prose paragraph, first sentence), so a few are mediocre (e.g. Installation).

🤖 Generated with Claude Code

@LinuxDevil
LinuxDevil merged commit 5ab2bb6 into main Oct 1, 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