[RFC] LLVM AI tool policy: AGENTS.md

Thanks for starting the conversation. -1, for the same reason we don’t commit an editor configuration file.

The repo root commits tool configuration whose effect is deterministic and checkable
(.clang-format, .clang-tidy, .git-blame-ignore-revs), and ignores tool configuration
that only shapes one developer’s private workflow (.vscode, .idea, .clangd, /tags).
AGENTS.md and CLAUDE.md are already in the second group, deliberately.

Even the minimal two-link version buys nothing.

  • AIToolPolicy.md is a set of obligations on humans, not instructions an
    agent can execute: the contributor is the author and is accountable, and the
    agent is the thing being reviewed.
  • CodingStandards.md’s mechanically checkable subset is already committed in
    the form that works, .clang-format and .clang-tidy, and enforced on every
    PR by pr-code-format.yml and pr-code-lint.yml. What remains in the prose
    is the judgment part, which is what reviewers are for. It is also not
    project-wide: its own second paragraph says subprojects such as libc++
    deviate, and libcxx/docs/CodingGuidelines.rst,
    libsycl/docs/CodingGuidelines.md and orc-rt/docs/CodingConventions.md
    exist. Pointing every agent at the LLVM-wide document is wrong in those
    trees.

And the cost lands on exactly the wrong people. Every session begins by reading the 78 KB of AIToolPolicy.md and CodingStandards.md, describing a policy the contributor has likely already accepted. Established contributors start agent sessions in a clone all day and pay this every time.

Finally, the mere presence of AGENTS.md is the wrong signal. It and CLAUDE.md would be
the first two named files in the root listing, above CODE_OF_CONDUCT.md and
CONTRIBUTING.md: an invitation to every newcomer who looks at this repository and wants
to open a PR. Low-quality patches are already discussed in threads like

I am also receiving many low-quality patches in some areas I maintain.

What to do instead: I am not sure. Contributors who want to share their own configurations
can do so outside of the repo, but I would rather not create the impression that we encourage newcomers to use LLMs to contribute.

7 Likes