跪拜 Guibai
← Back to the summary

AGENTS.md Audit: 8 Repos Fully Wired, 13 One Wire Short of CI

I scanned 30 AGENTS.md files: the real problem isn't that nobody writes them, it's that they aren't wired up

First, two AGENTS.md files, verbatim.

First: mcollina/skills, 682 tokens (71 lines, 2.7KB).

The opening states it's a skills/prompt library for AI coding agents, and the real commands are in the later Common commands section:

This file provides guidance to AI coding agents like Claude Code
(claude.ai/code), Cursor AI, Codex, Gemini CLI...

## Common commands
- Install deps: `npm install`
- Typecheck: `npm run typecheck`
- Lint: `npm run lint`
- Run tests: `npm test` (alias for `node --test`)
- Run a single test file: `node --test path/to/file.test.ts`
- Run tests matching a name: `node --test --test-name-pattern "pattern"`

Six commands: install, typecheck, lint, tests are all there, clearly written. But the repo has no CI.

Second: modelcontextprotocol/servers, 12,911 tokens (757 lines, 51KB).

The opening draws boundaries: this file holds rules, multi-step procedures belong in .claude/skills/, loaded on demand:

**This file holds the _rules_: the conventions a reviewer cites against a diff.**
It is loaded in full at the start of every session, so it stays resident...

Procedures (multi-step recipes with commands and live IDs) belong in skills
under `.claude/skills/`, which load on demand.

Below that: skill index, project structure, commands, commit gates—like a manual that can be reviewed.

By intuition, the second looks more "executable." But when both repos are hooked to a checker, the results flip: the 682-token one scores 20, the 12,911-token one scores 100.

The difference isn't word count, it's five wires.

一、Two documents, two scores

The 682-token one from mcollina/skills. The doc has 6 verification commands, clearly written; the repo has no CI. Commands rely on committers remembering. 20 points.

The 12,911-token one from modelcontextprotocol/servers. The doc reads like a manual, but CI actually runs tests, doc command families can be found in the pipeline, and CI has a dedicated AGENTS gate. 100 points.

These two documents together show an easily overlooked fact: the value of AGENTS.md isn't in how comprehensively it's written, but in whether it's connected to something that actually runs.

二、How I scanned: five wires

I defined five checkable criteria for "wiring," each worth 20 points:

Wire What it checks Failure means
doc-commands Does the doc have test / lint / check commands No executable entry point
ci-pipeline Does the repo have a CI config No machine executes
ci-validation Does CI actually run tests or checks CI only builds/publishes
doc-ci-match Do command families in the doc appear in CI Doc and pipeline run separately
guard Hook or AGENTS-specific gate Relies on people remembering

This is not markdown lint. Lint checks format; this checks whether docs and automation are connected.

Why five wires, not three or ten? Because "wiring" requires at least four stages: commands in the doc, CI in the repo, CI actually executing, and doc and CI speaking the same thing; plus a pre-commit gate to close the loop. Missing one breaks the chain at a specific point.

For "doc and CI speaking the same thing," I used command families, not literal matches. Doc says npm test, CI says npm run test:unit—same family; doc says pytest, CI says uv run pytest—also same. This tolerates package manager and parameter differences, but also causes false positives: e.g., actions/checkout contains check, and without word-boundary in the regex, it's counted as "CI runs checks." The first version hit this, and I added \b to fix it.

三、Distribution across 30 repos

The sample is 5 high-star baselines + 25 mid/low-size repos, total 30.

Score Repos Wiring Meaning
100 8 5/5 All wired
80 13 4/5 One wire short
60 1 3/5 Half-wired
≤40 8 ≤2/5 Rely on discipline

26 repos have CI, 20 can match command families from docs into CI, only 10 have hooks or AGENTS-specific gates.

Of the 13 at 80, 12 miss the same wire: the pre-commit gate; 1 misses the doc-CI correspondence.

This distribution is more interesting than "whether they wrote AGENTS.md": most repos aren't missing the file, they've wired it but not completely.

How to read scores? 100 isn't "good project," 20 isn't "bad project." It only answers one question: is this doc connected to something that runs?

The 80-point group is most worth looking at. They know to write, and they have execution; docs, CI, tests are aligned, only the final gate is missing. Adding that wire costs far less than going from 20 to 80.

四、Only two are paper specs; half-wired is the majority

The most "paper-like" ones are only two.

mcollina/skills: 682 tokens, 6 verification commands, no CI, 20 points.

haziqahmedqasmi/PeakCut: 1,317 tokens, doc says python tests/run.py, the test file is in the repo, but no CI, 20 points.

Their common point isn't bad writing; it's that "execution" stops in the doc and never becomes something a machine does every time.

More common is "half-wired." It has three forms.

ReAbout/web-sec: doc is only 351 tokens, one command, short enough not to look like a "spec"; but CI precisely runs python scripts/check-consistency.py, doc and pipeline are the same thing. Also 80, also short a gate.

u14app/neo-chat: 1,108 tokens, 7 commands, CI matches, but no gate, 80 points.

The third form is the easiest to overlook because it "looks done." CI is green, tests pass, doc written, only the pre-commit gate is empty.

Half-wired is more insidious than paper specs. Paper specs are obvious at a glance; half-wired looks complete—CI runs, tests run, doc written—but the last mile still relies on people.

The last wire is the cheapest and the most easily ignored. CI only tells you after a push; a hook can block before commit. The difference is one commit, and also one "well, next time."

五、Length isn't the variable; the breakpoint is

Repo AGENTS.md tokens Score Breakpoint
astral-sh/uv 936 100 None
modelcontextprotocol/servers 12,911 100 None
u14app/neo-chat 1,108 80 Missing gate
mcollina/skills 682 20 No CI
microsoft/vscode-languageserver-node 443 40 Doc delegates to CONTRIBUTING

astral-sh/uv has only 936 tokens and passes all five wires; modelcontextprotocol/servers has 12,911 tokens and also passes all five.

Long can be clear, short can be clear. In this sample of 30, token count and score show no obvious relationship.

What actually determines the score is whether the doc's commands become steps in a pipeline.

There's a more subtle breakpoint: microsoft/vscode-languageserver-node. AGENTS.md is only 443 tokens, first sentence says "see CONTRIBUTING.md"; CI runs npm run all, tests are real. But AGENTS.md itself contains no executable commands, so the checker sees a blank. 40 points.

The doc hands execution authority to another file. Humans know where to look; machines don't.

That's the real meaning of "doc length isn't the variable": the breakpoint isn't word count, it's whether execution authority is handed to machines. uv's 936 tokens work because every line has a counterpart in CI; modelcontext's 12,911 tokens aren't redundant because it's a manual verifiable by the pipeline.

六、Big repos rely on CI; small teams rely on discipline

All 5 high-star baselines score 100; among 25 mid/small repos, only 3 score 100, and 8 are at 40 or below.

Sample Count 100 points ≤40 points
High-star baseline 5 5 0
Mid/small repos 25 3 8

The 5 high-star repos are modelcontextprotocol/servers, astral-sh/uv, tldraw/tldraw, documenso/documenso, remix-run/remix.

This data doesn't prove "bigger teams are better." The 5 high-star repos are a positive control, not a random sample; they already have more mature engineering processes. What it does show: teams that execute well rely on pipelines and gates; the doc is the entry point, not the executor.

Among 25 mid/small repos, 8 are at 40 or below, and 4 of those have no CI at all. This isn't "small teams don't try," it's "small teams lack that mandatory gate."

Big repos rely on CI, small teams rely on discipline. Discipline is not valueless, but it's unmeasurable and non-inheritable.

This isn't a moral judgment. The high-star repos' 100s come largely from existing engineering infrastructure; a mid/small repo's 20 might just be because the project just started and doesn't have CI. The checker measures "is it wired now," not "is the team excellent."

But if the goal is to make specs actually effective, the conclusion is sober: install the gate first, then talk culture.

七、The tool: agents-md-check

I wrote these five wires into a CLI: agents-md-check. Python 3 stdlib, read-only on the repo, uploads nothing.

python3 check.py /path/to/repo
python3 check.py /path/to/repo --json
python3 check.py /path/to/repo --ci --min-score 80

It outputs total score, wire count, conclusion, and P0/P1/P2 suggestions:

You don't need to deploy the full set at once. The minimum viable wiring is a workflow that runs a single command plus a pre-commit hook:

name: agents-md
on: [pull_request]
jobs:
  check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: python3 agents-md-check/check.py . --ci --min-score 80
#!/bin/sh
# .githooks/pre-commit
python3 agents-md-check/check.py . --ci --min-score 80

The first makes CI run on every PR; the second blocks locally before commit. Both point to the same checker, so the doc, CI, and gate truly speak the same thing.

How to get it is at the end of the article.

A sample output for a 100-point repo looks like:

Score 100/100 · 5/5 wires · 已接线
✓ 文档里有可执行的验证命令 — 9 条验证命令
✓ 仓库有 CI 流水线 — .github/workflows/dco.yml
✓ CI 真的跑测试或检查 — CI 中出现 test / lint / check 类步骤
✓ 文档命令能在 CI 里找到 — 命中:check, format, pytest, ruff
✓ 有 hook 或 AGENTS 专项门禁 — CI 提到 AGENTS.md

--ci exits with 1 when the score is below threshold or a P0 exists, so it can be plugged into a pipeline.

I suggest the order of fixes reversed:

  1. Add CI first, so the repo has a machine that runs something every time;
  2. Then change doc commands to those CI actually runs;
  3. Finally add a pre-commit gate, or an AGENTS-specific check.

Don't write a 500-line AGENTS.md upfront. Write 5–10 lines, each corresponding to a runnable command. If you write more, both humans and machines forget.

八、Boundaries, Q&A, and a cheat sheet

Q1: Is this just another markdown lint?

No. Lint checks format; this checks whether docs and automation are connected. However pretty the format, without CI it's 20 points.

Q2: Does 100 points mean the spec is definitely enforced?

No. It only means all five wires are present; it doesn't prove rules are reasonable, reviews are careful, or test coverage is sufficient. It checks connection, not culture.

Q3: How is "execution rate" calculated, and can it misjudge?

Here "execution rate" is the wiring rate of five wires, not runtime compliance. It's a heuristic check and can misjudge: e.g., a doc that puts commands in CONTRIBUTING is invisible to the machine; a CI step named only Sanity check counts as verification. So it's suited for health checks, not audits.

Q4: What if a small team has no CI?

First add a minimal workflow that runs a single test—that counts as one wire. Without CI, a spec relies on discipline; with CI, there's visible execution.

Q5: How many rules should I write?

Start with 5–10, each corresponding to a runnable command. Beyond 20, humans start skipping and machines struggle to match. Rules aren't better when more comprehensive; they're better when more executable.

Q6: What can't it detect?

It can't detect whether rules themselves are reasonable, whether reviews are thorough, whether test coverage is enough, or whether runtime bypasses happen. It only detects visible connections between docs and automation.

Q7: Does it read or upload code?

No. It only reads Markdown, CI configs, and hook directories in the repo. It reads no code content and uploads nothing.

Cheat sheet

Question One-liner
Should I write AGENTS.md Yes, but it's only the entry point
How long 5–10 commands, must be runnable
How to judge usefulness Look at five wires, not word count
Minimum fix CI first, then commands, then gate
Tool boundaries Read-only, heuristic, single-repo, doesn't read code

Data and method

The sample is not random: the 5 high-star ones are deliberately chosen positive controls; the 25 mid/small repos come from search results and still have selection bias. 30 repos can only describe distribution, not infer causation.

But one thing doesn't need 300 samples to confirm: AGENTS.md isn't a document; it's an entry point to CI.