跪拜 Guibai
← All articles
AGENTS.md · AI Programming · Claude · Engineering Efficiency · CI

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

By 莪_幻尘 ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

Without a pre-commit guard, AGENTS.md remains advisory: CI catches errors after a push, so the final step depends on memory. Adding that single wire is cheap and turns documentation into enforced policy, which is the difference between a spec that runs and one that merely exists.

Summary

A scan of 30 AGENTS.md files shows that the gap isn't in writing the file; it's in wiring it to automation. The author defines five checkable criteria: commands in the doc, a CI pipeline, CI actually running checks, doc-CI command matching, and a pre-commit guard. Each wire is worth 20 points.

Out of 30 repos, 8 score a perfect 100, but 13 sit at 80, almost always missing the guard. Only 10 repos have any hook or AGENTS-specific gate. Token count doesn't predict the score: the 936-token `astral-sh/uv` and the 12,911-token `modelcontextprotocol/servers` both pass all five wires, while a 682-token repo with no CI scores 20.

The author packaged the five checks into a Python CLI, `agents-md-check`, that is read-only and doesn't upload anything. The recommended fix order is CI first, then aligning doc commands to the pipeline, then adding a gate. The tool supports a `--ci` flag for plugging into CI pipelines directly.

Takeaways
— The five wires: doc-commands, ci-pipeline, ci-validation, doc-ci-match, and guard.
— 8 of 30 repos score 100/100; 13 score 80/100; 1 scores 60; 8 score 40 or below.
— 26 repos have CI, 20 have matching command families, but only 10 have hooks or AGENTS-specific gates.
— Token count does not correlate with score: 936-token `astral-sh/uv` and 12,911-token `modelcontextprotocol/servers` both score 100; a 682-token repo with no CI scores 20.
— The tool `agents-md-check` is Python 3 stdlib, read-only, doesn't upload code, and supports `--ci` for CI integration.
— The suggested fix order: add CI first, align doc commands to the pipeline, then add a pre-commit gate.
— For a minimal setup, a workflow running one command plus a pre-commit hook both calling the checker is enough.
Conclusions

The 80-point cluster shows that many teams already have docs and CI aligned; the missing guard is the cheapest wire to add, so the payoff is immediate and low-risk.

The four low-scoring repos with no CI at all suggest small teams rely on individual discipline, which is unmeasurable and doesn't scale when contributors change.

Using command families instead of literal matches makes the check tolerant of package manager differences but invites false positives like `actions/checkout` matching `check`; the tool's heuristic nature means it works as a health check, not an audit.

Concepts & terms
AGENTS.md
A file that provides instructions to AI coding agents (Claude Code, Cursor, Codex, etc.) about project conventions, commands, and rules. It's loaded by the agent at session start and is meant to keep AI-assisted edits aligned with the repo's actual build and test process.
Command family matching
A heuristic that treats `npm test` and `npm run test:unit` as equivalent because they share the same command family, tolerating differences in package managers or parameter styles when checking if doc commands appear in CI.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗