Skip to content

docs(agents): make agent-doc links absolute and publish llms.txt - #686

Merged
ryanjwilke merged 1 commit into
mainfrom
ryanjwilke/great-kirch-c1d5d3
Jun 10, 2026
Merged

docs(agents): make agent-doc links absolute and publish llms.txt#686
ryanjwilke merged 1 commit into
mainfrom
ryanjwilke/great-kirch-c1d5d3

Conversation

@ryanjwilke

@ryanjwilke ryanjwilke commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Problem

Agents consuming the design system docs over HTTP (e.g. Claude Design) use fetch tools with a safety guardrail: they can only fetch absolute URLs that already appear in the conversation or in previously fetched pages. Our agent docs defeated that in two ways:

  1. Every cross-doc link under .agents/ was relative (./colors.md), so fetching agents/index.md unlocked nothing — an agent couldn't follow the router to any pillar or component doc.
  2. The index itself wasn't discoverable — nothing on the domain linked to it, so the only way in was a human pasting the URL into every conversation.

Goal

An agent that can reach design.cypress.io by web search should be able to walk the whole guidance tree with no human in the loop: search → homepage → index → everything.

Changes

  • Absolute links everywhere — all ~100 relative cross-doc links under .agents/ rewritten to https://design.cypress.io/agents/.... Link text keeps the short path; only hrefs changed. Local repo agents are unaffected (they read via AGENTS.md paths).
  • llms.txt at the domain root — generated by scripts/copy-agents.mjs during build:docs from the actual served tree (93 docs incl. component instructions/ReadMes), so it can't drift. Gitignored like docs/public/agents/.
  • Homepage "For AI agents" section — links the agent index and llms.txt so the chain starts from a searchable page (same pattern docs.cypress.io uses).
  • AGENTS.md — documents the absolute-link convention so new links stay absolute.

Verification

Ran the dev server and confirmed: /agents/index.md serves with absolute links and zero remaining relative links, /llms.txt lists every served doc, and the homepage renders the new section with both links.

🤖 Generated with Claude Code


Note

Low Risk
Documentation and static-site build output only; no runtime product, auth, or data paths change.

Overview
Agents that fetch design-system guidance over HTTP often can only follow absolute URLs, so relative cross-links in .agents/ blocked navigation from the router to pillar and component docs. This PR rewrites those cross-doc links to https://design.cypress.io/agents/... across the agent markdown corpus and documents the convention in AGENTS.md so new links stay absolute.

scripts/copy-agents.mjs now emits docs/public/llms.txt (gitignored, built with build:docs) listing every served .md with absolute URLs so the full tree is discoverable from the domain root. The docs homepage gains a For AI agents section pointing at the index and llms.txt, matching the intended path: searchable site → index → rest of the guidance.

Reviewed by Cursor Bugbot for commit a1e02a9. Bugbot is set up for automated code reviews on this repo. Configure here.

- rewrite all relative cross-doc links under .agents/ to absolute
  https://design.cypress.io/agents/ URLs so an agent fetching one doc
  over HTTP can follow links to the rest
- generate llms.txt at the domain root from copy-agents.mjs, listing
  every served doc so the whole tree is discoverable without a human
  pasting URLs
- link the agent index and llms.txt from the docs homepage; document
  the absolute-link convention in AGENTS.md

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Jun 10, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: a1e02a9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel

vercel Bot commented Jun 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cypress-design Ready Ready Preview Jun 10, 2026 10:06am

Request Review

@cypress

cypress Bot commented Jun 10, 2026

Copy link
Copy Markdown

cypress-design    Run #3823

Run Properties:  status check passed Passed #3823  •  git commit cbae8d0468 ℹ️: Merge a1e02a92c590c9ef02439f609f3986c48988fe1f into 8dcf90b828786d81fb62a0e1c501...
Project cypress-design
Branch Review ryanjwilke/great-kirch-c1d5d3
Run status status check passed Passed #3823
Run duration 02m 20s
Commit git commit cbae8d0468 ℹ️: Merge a1e02a92c590c9ef02439f609f3986c48988fe1f into 8dcf90b828786d81fb62a0e1c501...
Committer Ryan Wilke
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 2
View all changes introduced in this branch ↗︎

Warning

No Report: Something went wrong and we could not generate a report for the Application Quality products.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves discoverability and navigability of the design-system agent docs when consumed over HTTP by agents that can only follow absolute URLs. It updates the hosted .agents/ markdown corpus to use absolute cross-doc links, and adds a generated llms.txt at the site root so the full served doc tree can be discovered starting from the homepage.

Changes:

  • Generate docs/public/llms.txt during build:docs, listing every served agent doc as an absolute URL.
  • Add a homepage “For AI agents” section linking to /agents/index.md and /llms.txt.
  • Document the “absolute link” convention in AGENTS.md and update .agents/*.md cross-doc links accordingly.

Reviewed changes

Copilot reviewed 21 out of 22 changed files in this pull request and generated no comments.

Show a summary per file
File Description
scripts/copy-agents.mjs Generates docs/public/llms.txt from the copied/served docs/public/agents tree.
docs/src/pages/index.mdx Adds homepage entry points to the agent index and llms.txt.
AGENTS.md Documents the absolute cross-doc link convention and llms.txt generation.
.gitignore Ignores generated docs/public/llms.txt.
.agents/voice.md Converts cross-doc links to absolute hosted URLs.
.agents/typography.md Converts cross-doc links to absolute hosted URLs.
.agents/spacing.md Converts cross-doc links to absolute hosted URLs.
.agents/review-checklist.md Converts cross-doc links to absolute hosted URLs.
.agents/product-review-checklist.md Converts cross-doc links to absolute hosted URLs.
.agents/principles/visual-hierarchy.md Converts cross-doc links to absolute hosted URLs.
.agents/principles/ux.md Converts cross-doc links to absolute hosted URLs.
.agents/principles/releases.md Converts cross-doc links to absolute hosted URLs.
.agents/principles/product.md Converts cross-doc links to absolute hosted URLs.
.agents/principles/learning-from-feedback.md Converts cross-doc links to absolute hosted URLs.
.agents/principles/feedback.md Converts cross-doc links to absolute hosted URLs.
.agents/principles/ai.md Converts cross-doc links to absolute hosted URLs.
.agents/index.md Converts cross-doc links to absolute hosted URLs.
.agents/illustrations.md Converts cross-doc links to absolute hosted URLs.
.agents/iconography.md Converts cross-doc links to absolute hosted URLs.
.agents/errors.md Converts cross-doc links to absolute hosted URLs.
.agents/colors.md Converts cross-doc links to absolute hosted URLs.
.agents/accessibility.md Converts cross-doc links to absolute hosted URLs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ryanjwilke
ryanjwilke merged commit 4521b9b into main Jun 10, 2026
22 of 24 checks passed
@ryanjwilke
ryanjwilke deleted the ryanjwilke/great-kirch-c1d5d3 branch June 10, 2026 12:32
@cypress

cypress Bot commented Jun 10, 2026

Copy link
Copy Markdown

cypress-design    Run #3825

Run Properties:  status check passed Passed #3825  •  git commit 4521b9b548: docs(agents): make agent-doc links absolute and publish llms.txt (#686)
Project cypress-design
Branch Review main
Run status status check passed Passed #3825
Run duration 02m 29s
Commit git commit 4521b9b548: docs(agents): make agent-doc links absolute and publish llms.txt (#686)
Committer Ryan Wilke
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 2
View all changes introduced in this branch ↗︎

Warning

No Report: Something went wrong and we could not generate a report for the Application Quality products.

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.

2 participants