Skip to content

ECO-251: Improve developers.uniswap.org agent readiness#1127

Open
wkoutre wants to merge 2 commits intoUniswap:mainfrom
wkoutre:nickkoutrelakos/eco-251-agent-readiness
Open

ECO-251: Improve developers.uniswap.org agent readiness#1127
wkoutre wants to merge 2 commits intoUniswap:mainfrom
wkoutre:nickkoutrelakos/eco-251-agent-readiness

Conversation

@wkoutre
Copy link
Copy Markdown

@wkoutre wkoutre commented Apr 28, 2026

Summary

Cloudflare's agent-readiness check rated developers.uniswap.org as Level 0 / Not Ready. This PR raises the score with a focused set of static-config changes:

  • Canonical URL alignmentsiteConfig.url updated from https://docs.uniswap.org (legacy redirect source) to https://developers.uniswap.org (actual served origin). Sitemap absolute URLs, <link rel="canonical"> tags, and OpenGraph URLs now all match the deployed domain.
  • /llms.txt rewritten to spec — follows the llmstxt.org format strictly: H1 title, blockquote summary, and H2 sections of markdown link lists. URLs updated to developers.uniswap.org. Cross-links to /llms-full.txt and /v4-llms.txt.
  • /llms-full.txt generated at build time — added a customLLMFiles entry to the existing docusaurus-plugin-llms plugin instance. Emits a ~1.3 MB plain-text concatenation of current docs (v4 + SDKs + APIs + concepts) at the site root. Legacy /v4-llms.txt and /v4-llms-full.txt continue to be generated.
  • robots.txt modernized — sitemap reference points to developers.uniswap.org/sitemap.xml. Allowlist expanded to cover the modern AI-bot set (GPTBot, OAI-SearchBot, ChatGPT-User, ClaudeBot, Claude-Web, anthropic-ai, Google-Extended, GoogleOther, Applebot, Applebot-Extended, PerplexityBot, Perplexity-User, CCBot, cohere-ai, Meta-ExternalAgent, Meta-ExternalFetcher, Amazonbot, DuckAssistBot, MistralAI-User, xAI, Diffbot, etc.). Block list extended with Bytespider.

Why these specifically

Cloudflare's agent-readiness rubric weighs the following highest: a permissive and well-formed robots.txt, a present and parseable /llms.txt, an /llms-full.txt companion, a discoverable sitemap.xml, and consistent canonical URLs. This PR addresses each. JSON-LD structured data is the next-cheapest follow-up if Cloudflare's checker still flags gaps after this lands — out of scope here because it requires theme swizzling and per-page MDX edits (broader surface area, longer review).

Verification

  • NODE_OPTIONS='--openssl-legacy-provider' yarn build succeeds. Pre-existing broken-anchor warnings in /api/subgraph/subgraphs-devs/*, /sdk/v2/*, /sdk/v3/* are unrelated and present on main.
  • Spot-checked outputs in build/:
    • build/sitemap.xml<loc>https://developers.uniswap.org/...</loc> for all entries
    • build/index.html<link rel="canonical" href="https://developers.uniswap.org/">
    • build/contracts/v4/overview/index.html<link rel="canonical" href="https://developers.uniswap.org/contracts/v4/overview">
    • build/llms.txt (7 KB, spec format) and build/llms-full.txt (1.3 MB, plugin-generated) both present
    • build/robots.txt advertises the correct sitemap URL

Out of scope

  • editUrl in the docs preset still points at https://github.com/uniswap/uniswap-docs/tree/main/ (a repo that doesn't exist; should be Uniswap/docs). Pre-existing, unrelated to agent-readiness — recommend a separate PR.
  • JSON-LD structured-data injection on overview pages — see "Why these specifically" above.

Linear

ECO-251

Test plan

  • After deploy, re-run the Cloudflare agent-readiness check at https://agents.cloudflare.com against https://developers.uniswap.org and confirm score moves up from Level 0
  • Confirm https://developers.uniswap.org/llms.txt serves the new spec-format index
  • Confirm https://developers.uniswap.org/llms-full.txt serves the full content file (~1.3 MB)
  • Confirm https://developers.uniswap.org/robots.txt advertises the correct sitemap URL and modern AI-bot allowlist
  • Confirm https://developers.uniswap.org/sitemap.xml URLs all use the developers.uniswap.org host
  • Spot-check a few page <link rel="canonical"> tags in production HTML

🤖 Autonomously generated by the Linear Task Worker skill via Claude Code. Review carefully before merging.

Cloudflare's agent-readiness check rated developers.uniswap.org as
Level 0 / Not Ready. This PR raises the score by aligning the
canonical site URL, expanding the AI-bot allowlist, rewriting the
top-level llms.txt to follow the llmstxt.org spec, and generating a
site-wide /llms-full.txt at build time.

- docusaurus.config.ts: set siteConfig.url to the actual served
  domain (developers.uniswap.org). Sitemap entries, canonical
  <link> tags, and OpenGraph URLs now match the deployed origin
  instead of the legacy docs.uniswap.org redirect source.
- docusaurus.config.ts: add a customLLMFiles entry to the existing
  docusaurus-plugin-llms instance that emits /llms-full.txt with
  full markdown content for current docs (v4 + SDKs + APIs +
  concepts). Build verified — file lands at /llms-full.txt
  (~1.3MB) alongside the existing /v4-llms.txt and /v4-llms-full.txt.
- static/llms.txt: rewrite to follow the llmstxt.org spec — H1
  title, blockquote summary, and H2 sections of markdown link
  lists. URLs updated to developers.uniswap.org. Cross-links
  to /llms-full.txt and /v4-llms.txt for agents that want the
  full content.
- static/robots.txt: update sitemap URL to
  https://developers.uniswap.org/sitemap.xml. Expand the AI-crawler
  allowlist with the major modern bots (OAI-SearchBot, ChatGPT-User,
  Claude-Web, anthropic-ai, Google-Extended, GoogleOther, Applebot,
  Applebot-Extended, PerplexityBot, Perplexity-User, CCBot,
  cohere-ai, Meta-ExternalAgent, Meta-ExternalFetcher, Amazonbot,
  DuckAssistBot, MistralAI-User, etc.). Block list extended with
  Bytespider.

No theme or content changes outside the static/* files and
docusaurus.config.ts. Build passes.
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 28, 2026

@wkoutre is attempting to deploy a commit to the Uniswap Team on Vercel.

A member of the Team first needs to authorize it.

@wkoutre wkoutre marked this pull request as ready for review April 30, 2026 00:08
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e7d423769f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread static/llms.txt Outdated
## Builder support

- [Get funded](https://developers.uniswap.org/builder-support/get-funded): Grants and funding programs from the Uniswap Foundation.
- [Hooks ecosystem](https://developers.uniswap.org/builder-support/hooks-ecosystem): Resources for hook developers, including audits and reusable templates.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Point builder-support entry to an existing docs route

The new Hooks ecosystem entry links to /builder-support/hooks-ecosystem, but this route does not exist in the repo (the docs/builder-support section only contains get-funded and security-resources). As a result, agents following llms.txt will hit a 404 for one of the curated core links, which degrades the file’s reliability as a discovery index.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Fixed. Replaced the broken /builder-support/hooks-ecosystem link with /builder-support/security-resources, which is the existing page covering audit subsidies and safe harbor protections for builders.

…urces

The /builder-support/hooks-ecosystem route does not exist in the repo.
Replaced with the existing /builder-support/security-resources page,
which covers audit subsidies and safe harbor protections for builders.

Resolves Codex inline comment on PR Uniswap#1127.
@wkoutre
Copy link
Copy Markdown
Author

wkoutre commented Apr 30, 2026

The Vercel CI failure is a team authorization issue, not a code problem. The check message is: "@wkoutre is attempting to deploy a commit to the Uniswap Team on Vercel. A member of the Team first needs to authorize it." A Uniswap Vercel team admin needs to authorize the deployment — no code change can unblock this.

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