Skip to content

Commit 75aed90

Browse files
authored
Merge pull request #3 from agent-ecosystem/v0.5.0
Prepare v0.5.0 release
2 parents eca54a3 + cfc929c commit 75aed90

45 files changed

Lines changed: 7521 additions & 119 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 46 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ Test your documentation site against the [Agent-Friendly Documentation Spec](htt
77

88
Agents don't use docs like humans. They hit truncation limits, get walls of CSS instead of content, can't follow cross-host redirects, and don't know about quality-of-life improvements like `llms.txt` or `.md` docs pages that would make life swell. Maybe this is because the industry has lacked guidance - until now.
99

10-
afdocs runs 21 checks across 8 categories to evaluate how well your docs serve agent consumers. 16 are fully implemented; the rest return `skip` until completed.
10+
afdocs runs 22 checks across 8 categories to evaluate how well your docs serve agent consumers.
1111

1212
> **Status: Early development (0.x)**
1313
> This project is under active development. Check IDs, CLI flags, and output formats may change between minor versions. Feel free to try it out, but don't build automation against specific output until 1.0.
1414
>
15-
> Implements [spec v0.1.0](https://agentdocsspec.com/spec) (2026-02-22).
15+
> Implements [spec v0.2.1](https://agentdocsspec.com/spec) (2026-03-15).
1616
1717
## Quick start
1818

@@ -43,7 +43,7 @@ Authentication
4343
✓ auth-gate-detection: All 50 sampled pages are publicly accessible
4444
4545
Summary
46-
9 passed, 3 failed, 9 skipped (21 total)
46+
9 passed, 3 failed, 10 skipped (22 total)
4747
```
4848

4949
## Install
@@ -75,12 +75,34 @@ afdocs check https://docs.example.com --pass-threshold 30000 --fail-threshold 80
7575
| `--format <format>` | `text` | Output format: `text` or `json` |
7676
| `-v, --verbose` | | Show per-page details for checks with issues |
7777
| `--checks <ids>` | all | Comma-separated list of check IDs |
78+
| `--sampling <strategy>` | `random` | URL sampling strategy (see below) |
7879
| `--max-concurrency <n>` | `3` | Maximum concurrent HTTP requests |
7980
| `--request-delay <ms>` | `200` | Delay between requests |
8081
| `--max-links <n>` | `50` | Maximum links to test in link checks |
8182
| `--pass-threshold <n>` | `50000` | Size pass threshold (characters) |
8283
| `--fail-threshold <n>` | `100000` | Size fail threshold (characters) |
8384

85+
### Sampling strategies
86+
87+
By default, afdocs discovers pages from your site (via `llms.txt`, sitemap, or both) and randomly samples up to `--max-links` pages to check. The `--sampling` flag gives you control over how that sample is selected.
88+
89+
| Strategy | Behavior |
90+
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
91+
| `random` | Shuffle discovered URLs and take the first N. Fast and broad, but results vary between runs. |
92+
| `deterministic` | Sort discovered URLs alphabetically, then pick every Nth URL for an even spread. Produces the same sample on repeated runs as long as the URL set is stable. |
93+
| `none` | Skip discovery entirely. Only check the URL you pass on the command line. |
94+
95+
```bash
96+
# Reproducible runs for CI or iteration (same pages every time)
97+
afdocs check https://docs.example.com --sampling deterministic
98+
99+
# Check a single page without any discovery
100+
afdocs check https://docs.example.com/api/auth --sampling none
101+
102+
# Check a single page with specific checks
103+
afdocs check https://docs.example.com/api/auth --sampling none --checks page-size-html,redirect-behavior
104+
```
105+
84106
### Exit codes
85107

86108
- `0` if all checks pass or warn
@@ -144,7 +166,7 @@ describe('agent-friendliness', () => {
144166

145167
## Checks
146168

147-
21 checks across 8 categories. Checks marked with \* are not yet implemented and return `skip`.
169+
22 checks across 8 categories.
148170

149171
### Category 1: llms.txt
150172

@@ -165,19 +187,20 @@ describe('agent-friendliness', () => {
165187

166188
### Category 3: Page Size and Truncation Risk
167189

168-
| Check | Description |
169-
| ------------------------ | ------------------------------------------------ |
170-
| `page-size-markdown` | Character count when served as markdown |
171-
| `page-size-html` | Character count of HTML and post-conversion size |
172-
| `content-start-position` | How far into the response actual content begins |
190+
| Check | Description |
191+
| ------------------------ | --------------------------------------------------------------- |
192+
| `rendering-strategy` | Whether pages contain server-rendered content or are SPA shells |
193+
| `page-size-markdown` | Character count when served as markdown |
194+
| `page-size-html` | Character count of HTML and post-conversion size |
195+
| `content-start-position` | How far into the response actual content begins |
173196

174197
### Category 4: Content Structure
175198

176-
| Check | Description |
177-
| --------------------------------- | -------------------------------------------------- |
178-
| `tabbed-content-serialization` \* | Whether tabbed content creates oversized output |
179-
| `section-header-quality` \* | Whether headers in tabbed sections include context |
180-
| `markdown-code-fence-validity` | Whether markdown has unclosed code fences |
199+
| Check | Description |
200+
| ------------------------------ | -------------------------------------------------- |
201+
| `tabbed-content-serialization` | Whether tabbed content creates oversized output |
202+
| `section-header-quality` | Whether headers in tabbed sections include context |
203+
| `markdown-code-fence-validity` | Whether markdown has unclosed code fences |
181204

182205
### Category 5: URL Stability and Redirects
183206

@@ -194,18 +217,18 @@ describe('agent-friendliness', () => {
194217

195218
### Category 7: Observability and Content Health
196219

197-
| Check | Description |
198-
| ---------------------------- | ---------------------------------------------- |
199-
| `llms-txt-freshness` \* | Whether `llms.txt` reflects current site state |
200-
| `markdown-content-parity` \* | Whether markdown and HTML versions match |
201-
| `cache-header-hygiene` | Whether cache headers allow timely updates |
220+
| Check | Description |
221+
| ------------------------- | ---------------------------------------------- |
222+
| `llms-txt-freshness` | Whether `llms.txt` reflects current site state |
223+
| `markdown-content-parity` | Whether markdown and HTML versions match |
224+
| `cache-header-hygiene` | Whether cache headers allow timely updates |
202225

203226
### Category 8: Authentication and Access
204227

205-
| Check | Description |
206-
| ---------------------------- | -------------------------------------------------------------------- |
207-
| `auth-gate-detection` | Whether documentation pages require authentication to access content |
208-
| `auth-alternative-access` \* | Whether auth-gated sites provide alternative access paths for agents |
228+
| Check | Description |
229+
| ------------------------- | -------------------------------------------------------------------- |
230+
| `auth-gate-detection` | Whether documentation pages require authentication to access content |
231+
| `auth-alternative-access` | Whether auth-gated sites provide alternative access paths for agents |
209232

210233
## Check dependencies
211234

package-lock.json

Lines changed: 134 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
"dependencies": {
6161
"chalk": "^5.4.1",
6262
"commander": "^13.1.0",
63+
"node-html-parser": "^7.1.0",
6364
"turndown": "^7.2.2",
6465
"yaml": "^2.7.0"
6566
},

0 commit comments

Comments
 (0)