Test your documentation site against the Agent-Friendly Documentation Spec. AFDocs runs 22 checks across 7 categories to measure how well AI coding agents can discover, navigate, and consume your docs.
Status: Early development (0.x) Check IDs, CLI flags, and output formats may change between minor versions. Implements spec v0.3.0 (2026-03-31).
npx afdocs check https://docs.example.com --format scorecardAgent-Friendly Docs Scorecard
==============================
Overall Score: 72 / 100 (C)
Category Scores:
Content Discoverability 72 / 100 (C)
Markdown Availability 60 / 100 (C)
Page Size and Truncation Risk 45 / 100 (D)
...
Interaction Diagnostics:
[!] Markdown support is undiscoverable
Your site serves markdown at .md URLs, but agents have no way to
discover this. ...
Check Results:
Content Discoverability
PASS llms-txt-exists llms.txt found at /llms.txt
WARN llms-txt-size llms.txt is 65,000 characters
Fix: If it grows further, split into nested llms.txt files ...
FAIL llms-txt-directive No directive detected on any tested page
Fix: Add a blockquote near the top of each page ...
npm install -g afdocsOr as a dev dependency for CI:
npm install -D afdocsRequires Node.js 22 or later.
Full documentation is available at afdocs.dev:
- Understand Your Score — what the score means and how it's calculated
- Improve Your Score — prioritized fix guide
- Checks Reference — all 22 checks with fix suggestions
- CLI Reference — flags, output formats, sampling strategies
- CI Integration — vitest helpers for your pipeline
- Programmatic API — TypeScript API for custom tooling
AFDocs makes HTTP requests to the sites it checks. It enforces delays between requests (200ms default), caps concurrent connections, and honors Retry-After headers.
MIT