JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2574
  • Score
    100M100P100Q113654F
  • License MIT

Test your documentation site against the Agent-Friendly Documentation Spec

Package Exports

  • afdocs
  • afdocs/helpers
  • afdocs/scoring

Readme

AFDocs logo

AFDocs

CI npm

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.

Powering Agent Score by Fern.

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).

Quick start

npx afdocs check https://docs.example.com --format scorecard
Agent-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 ...

Install

npm install -g afdocs

Or as a dev dependency for CI:

npm install -D afdocs

Requires Node.js 22 or later.

Documentation

Full documentation is available at afdocs.dev:

Responsible use

AFDocs makes HTTP requests to the sites it checks. It enforces delays between requests (200ms default), caps concurrent connections, and honors Retry-After headers.

License

MIT