Skip to content

feat: migrate to nuxt-agent-discovery - #1435

Open
benjamincanac wants to merge 7 commits into
mainfrom
feat/agent-discovery
Open

feat: migrate to nuxt-agent-discovery#1435
benjamincanac wants to merge 7 commits into
mainfrom
feat/agent-discovery

Conversation

@benjamincanac

@benjamincanac benjamincanac commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

Replace the hand-rolled agent discovery layer with nuxt-agent-discovery, adopt @nuxtjs/sitemap and publish an OpenAPI document. Markdown negotiation now runs in dev and on every host, not only on Vercel, and every docus site gets the discovery documents for free.

Deleted

  • modules/vercel-markdown-rewrite.ts: the module's Vercel preset writes the same rewrites, O(patterns) instead of one route per page parsed out of llms.txt
  • modules/not-found/: errors: true answers agents with a markdown body carrying the same recovery links as the Link header and the api-catalog
  • modules/skills/: skills.dir scans the directory and serves /.well-known/skills/
  • server/routes/sitemap.xml.ts: @nuxtjs/sitemap serves it, fed by server/api/__sitemap__/urls.ts with the same query. On i18n sites it becomes an index with one sitemap per locale and hreflang alternates
  • app/utils/prerender.ts: the module hints each twin from the page's own response
  • the markdown pipeline under the MCP tools, now getAgentDocument() and listAgentPages()

modules/config.ts feeds the module what only the layer knows: the MCP server card from the mcp-toolkit options, the /openapi.json link, and one sitemap.md section per locale. docus.skills and docus.notFound keep working as deprecated aliases.

What changes for agents

  • 18 AI user agents are honoured (ClaudeBot, GPTBot, ...) instead of curl/*, the same list that feeds the robots.txt allow groups. A bare curl now gets HTML, Accept: text/markdown and the .md twin still get markdown
  • / and /{locale} no longer redirect to /llms.txt, they serve their own markdown, ending with the list of everything the site publishes for agents
  • new documents: /openapi.json, /sitemap.md, /.well-known/api-catalog, /.well-known/mcp/server-card.json, agent groups and Content-Signal in robots.txt
  • raw documents open with title, description and canonical_url, and same-origin links are absolute
  • error bodies cover every status, not only 404
  • llms.contentRawMarkdown no longer applies, agentDiscovery.excludePrefixes and routes replace it

Docs updated accordingly, en and fr.

Checks

Build: same 42 HTML routes as main, 43 raw twins, openapi.json and sitemap.md prerendered, no failed route.

Preview: 42 of 42 pages negotiate, every twin static at the CDN with its canonical pair, discovery documents and error bodies as documented, is-agentic 87 against 85 on production.

@vercel

vercel Bot commented Sep 2, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
docus Ready Ready Preview Sep 3, 2026 3:11pm UTC

@pkg-pr-new

pkg-pr-new Bot commented Sep 2, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/create-docus@1435
npm i https://pkg.pr.new/docus@1435

commit: a35e7e5

@benjamincanac
benjamincanac marked this pull request as ready for review September 3, 2026 15:14
@benjamincanac benjamincanac changed the title feat(agentic): migrate to nuxt-agent-discovery feat: migrate to nuxt-agent-discovery Sep 4, 2026
@benjamincanac benjamincanac changed the title feat: migrate to nuxt-agent-discovery feat: migrate to nuxt-agent-discovery Sep 4, 2026
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