docs: improve agent-friendly docs score (AFDocs quick wins)#23
Merged
rachaelrenk merged 2 commits intomainfrom May 5, 2026
Merged
docs: improve agent-friendly docs score (AFDocs quick wins)#23rachaelrenk merged 2 commits intomainfrom
rachaelrenk merged 2 commits intomainfrom
Conversation
- Add llms.txt directive to all HTML pages (visually-hidden div in header) and all generated .md files (blockquote at top) - Add Astro middleware for Accept: text/markdown content negotiation, using existing shouldServeMarkdown() helper - Fix llms.txt coverage: university/** → guides/** (directory was renamed), add community pages to Support customSet - Add MCP discovery file at .well-known/mcp.json pointing to Kapa MCP - Verify <link rel=alternate type=text/markdown> already appears early in <head> — no repositioning needed Checks addressed: llms-txt-directive-html (FAIL → PASS) llms-txt-directive-md (FAIL → PASS) content-negotiation (FAIL → PASS) content-start-position (mitigated via Tasks 1+2) llms-txt-coverage (80% → improved) MCP Server Discoverable (FAIL → PASS) Co-Authored-By: Oz <oz-agent@warp.dev>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
hongyi-chen
approved these changes
May 5, 2026
| { | ||
| "name": "Warp Documentation", | ||
| "description": "Search and retrieve Warp documentation — the agentic development environment and Oz, Warp's programmable agent platform.", | ||
| "url": "https://warp.mcp.kapa.ai/sse", |
Collaborator
There was a problem hiding this comment.
What do we have to do to get this to work? Going to the URL gives me a 404. cc @dannyneira
The Kapa MCP server uses OAuth authentication at the base URL, not an SSE endpoint at /sse. Remove the incorrect path and transport field. Co-Authored-By: Oz <oz-agent@warp.dev>
Contributor
Author
|
Good catch @hongyi-chen, the Browsing directly will still return a 401 — that's expected. The Kapa MCP server uses OAuth authentication, so only MCP clients that handle the OAuth flow can connect (e.g., Claude, Cursor). The |
rachaelrenk
added a commit
that referenced
this pull request
May 5, 2026
… counts - Fix stale /sse path in afdocs-fix MCP example (matches PR #23 fix) - Add URL validation in afdocs_audit.mjs to prevent shell injection - Remove hardcoded baseline score from SKILL.md reporting instructions - Soften hardcoded page counts in known-exceptions.md (varies by run) - Scope page-size exception to /changelog/ only, not all large pages Co-Authored-By: Oz <oz-agent@warp.dev>
This was referenced May 5, 2026
rachaelrenk
added a commit
that referenced
this pull request
May 5, 2026
#25) * docs: add AFDocs audit skill for agent-friendly docs monitoring Add a reusable skill (.agents/skills/afdocs-audit/) that runs the AFDocs scorecard against docs.warp.dev and produces a structured report. Follows the same pattern as the existing docs-seo-audit skill. Includes: - SKILL.md with instructions for running, reporting, and Slack notifications - afdocs_audit.mjs wrapper script that runs npx afdocs check --format json, parses the output, and produces a structured report with scores, issues, and fix guidance - references/known-exceptions.md documenting expected failures and false positives (content-start-position, markdown-content-parity, page-size) The skill is designed to be run by a scheduled Oz agent (weekly cadence) to monitor the docs site's agent-friendliness score over time. Co-Authored-By: Oz <oz-agent@warp.dev> * docs: add afdocs-fix remediation skill (Part B) Add the companion skill that reads the afdocs-audit output and applies automated fixes for each failing check. Includes: - Fix procedures for each AFDocs check (llms.txt directive, content negotiation middleware, llms.txt coverage, MCP discovery, etc.) - Code snippets and file paths for each fix - Diagnostic steps for coverage mismatches - Clear separation of automatable vs. non-automatable checks - PR conventions (title prefix, labels, co-author) This is the 'fix layer' that a scheduled Oz agent runs after the audit skill to automatically remediate regressions. Co-Authored-By: Oz <oz-agent@warp.dev> * chore: hardcode #growth-docs channel ID (C09BVK0PL3Y) in afdocs-audit skill Co-Authored-By: Oz <oz-agent@warp.dev> * chore: simplify PR conventions — shorten prefix, remove nonexistent label Co-Authored-By: Oz <oz-agent@warp.dev> * chore: review fixes — stale MCP URL, URL validation, soften hardcoded counts - Fix stale /sse path in afdocs-fix MCP example (matches PR #23 fix) - Add URL validation in afdocs_audit.mjs to prevent shell injection - Remove hardcoded baseline score from SKILL.md reporting instructions - Soften hardcoded page counts in known-exceptions.md (varies by run) - Scope page-size exception to /changelog/ only, not all large pages Co-Authored-By: Oz <oz-agent@warp.dev> * fix: deploy middleware as Vercel Edge Function for content negotiation The Astro middleware in src/middleware.ts was not running at request time for pre-rendered (static) pages. The default middlewareMode ('classic') only executes middleware at build time for static pages, so Accept: text/markdown requests were served HTML from Vercel's CDN cache. Setting middlewareMode: 'edge' deploys the middleware as a separate Vercel Edge Function that runs at request time for ALL requests, including static pages. This enables content negotiation so agents sending Accept: text/markdown get clean markdown automatically. Co-Authored-By: Oz <oz-agent@warp.dev> * chore: revert Slack channel to placeholder per review feedback Reverts the hardcoded #growth-docs channel ID (C09BVK0PL3Y) back to a <CHANNEL_ID> placeholder, matching the docs-seo-audit pattern. The channel is specified in the scheduled agent's prompt, not in the skill. Co-Authored-By: Oz <oz-agent@warp.dev> --------- Co-authored-by: Oz <oz-agent@warp.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses failing AFDocs scorecard checks to improve the agent-friendly docs score from 82/100 (B) toward 95+ (A).
Changes
Task 1: llms.txt directive on all pages
Task 2: Content negotiation middleware
Task 3: Content-start-position verification
Task 4: llms.txt coverage improvement
Task 7: MCP discovery file
AFDocs checks addressed
References
Co-Authored-By: Oz oz-agent@warp.dev