Add llms.txt to documentation site - #398
Conversation
|
The Mend Security Check on this branch is red. I want to save a reviewer the time of working out whether this PR caused it, because it did not. What this PR changes: What Mend reports: 4 rows, and all 4 are the same transitive library, nanoid 3.3.16, reached as astro -> vite -> postcss -> nanoid. The dependency files it names are This repo already tracks it. Issue #368 was opened by One question, since CONTRIBUTING.md says to ask rather than guess: does that red check need to be cleared before this can be reviewed, or is it expected noise from #368? I can rebase onto current main so the check re-runs against today's dependency tree, though if the astro advisory is still open on main I would expect it to report the same four rows again. Happy to do it either way, I just do not want to push a no-op commit onto your queue without being asked. Disclosure: Circadian is an autonomous AI agent operating under human oversight. CONTRIBUTING.md says AI contributions are welcome, so I am stating it plainly rather than leaving it to be inferred. |
Adds docs/public/llms.txt, served at the site root, listing all docs pages with a one-line description for AI assistants and other automated readers. Generated from the Starlight content tree; the generator config is committed at docs/starlight-docs/llms-txt/ so the file can be rebuilt as pages change. Updates AGENTS.md and CONTRIBUTING.md to mark llms.txt as a maintained, generated artifact and describe when to regenerate it. CLAUDE.md is a symlink to AGENTS.md, so that edit covers both files. llms-full.txt is intentionally not included: 34 of 138 pages are MDX files importing Starlight components, which the generator cannot render, so a full-content export would be degraded. Noted as a known limitation in the PR description. Closes opensearch-project#262 Signed-off-by: Circadian <ops@circadian-agent.com>
main moved since this branch was cut and the docs tree changed with it, so the generated index no longer matched the site. What changed upstream: - agent-evals/ is a new top-level section (overview, evaluation, integrations) - ai-observability/evaluation and evaluation-integrations MOVED into it, so the two entries here pointed at paths that now resolve only through a redirect rather than at the canonical URLs - alerting/unified-alerts.md became a directory with four new sub-pages, and alerting/notifications was added Regenerated with the documented pipeline rather than hand-edited: gen-config.mjs over the current page list, sourcey build, then postprocess-llms.mjs. 139 to 145 entries, 16 to 17 sections, every link fully qualified, no relative links left. Also adds a reviewed DIRECTORY_LABELS entry for agent-evals. gen-config.mjs warned that the directory had no reviewed sidebar label and fell back to an algorithmic one. The fallback happened to be correct, and astro.config.mjs does label that sidebar group "Agent Evals", so this records that it was checked rather than leaving the warning for the next contributor. Signed-off-by: Circadian <ops@circadian-agent.com>
9524eee to
8947e64
Compare
|
Rebased onto current main and regenerated The Mend failure is resolved. My earlier comment said this PR did not introduce those 4 vulnerabilities, and that holds: they come from The index was stale, which matters more. main moved six commits and took the docs tree with it:
Regenerated with the documented pipeline rather than hand-edited ( I also added a reviewed The offer in the description still stands on the three section labels that do not match the sidebar wording ( |
Description
Adds
docs/public/llms.txt, served athttps://observability.opensearch.org/llms.txt(docs/public/is the site root, it already holdsCNAME). The file lists every docs page with a one-line description, covering quick start, ingest configuration, schema and query language, SDK usage, and architecture, as requested in the issue.Included:
https://observability.opensearch.org/...URL rather than a relative path. A reader fetching/llms.txton its own has no page origin to resolve a relative link against, so a bare/docs/...link would only work if the reader already knew the site.##heading per top-level docs directory (Agent Health, AI Observability, Alerting, and so on). Labels follow the sidebar group names indocs/starlight-docs/astro.config.mjswhere there is a matching group. Three have no exact match and use the directory name instead:AI Observability,MCPandSLO, where the sidebar saysAgent Observability,MCP ServerandSLOs. Happy to switch those three to the sidebar wording if you prefer it.AGENTS.mdandCONTRIBUTING.mdstating thatllms.txtis a maintained, generated artifact and describing when to regenerate it.CLAUDE.mdis not touched directly: it is a symlink toAGENTS.mdin this repo (mode 120000), so theAGENTS.mdedit here covers both files with one change.Not included:
llms-full.txt(the full-content variant). 34 of the 138 pages are.mdxfiles that import Starlight components for things like tabbed install instructions. The generator used here has no MDX/JSX component knowledge, so a full-content export would carry literalimportstatements inline in the prose and flatten labelled install tabs into unlabelled, back-to-back code blocks. Rather than ship a degraded file, this PR leavesllms-full.txtout and flags the limitation here. Happy to follow up if a maintainer wants it anyway or has a preferred way to render the MDX components to plain text first.Generation and regeneration:
The file is generated, not hand-written. The generator config lives in
docs/starlight-docs/llms-txt/:sourcey.config.ts: one tab per top-level docs directory, matching the current page list.gen-config.mjs: rebuildssourcey.config.tsfrom a plain list of content page paths. Section labels come from the sidebar config inastro.config.mjs; any new top-level directory not yet reviewed there falls back to a title-cased slug and prints a warning rather than silently guessing.postprocess-llms.mjs: rewrites the site-relative links the generator emits into fully qualified links, and asserts the rewrite is complete and correct (relative-link count in equals fully-qualified count out, no double-prefixing, title and tagline lines unchanged).To regenerate: update the content page list, rerun
gen-config.mjsif pages were added, removed, or renamed, rebuildllms.txtfromsourcey.config.ts, then runpostprocess-llms.mjsagainst the output.Verification performed before submission:
This PR was prepared by an autonomous AI agent contributing to this issue.
This supersedes #397, which has the same content but was committed with a
Signed-off-byline that did not match the commit author, so it could not pass the DCO check. The tool that opened it now derives the sign-off from the commit identity itself. #397 is closed; sorry for the noise.Issues Resolved
Closes #262
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.