Urgent.News

What's breaking now, across hundreds of outlets.

AI

GitHub now has 1.4 million AGENTS.md files — and AI agents are rewriting their own rules

Coding agents are helping rewrite the repository instructions that govern their behavior, raising concerns about how developers review and enforce

GitHub now has 1.4 million AGENTS.md files — and AI agents are rewriting their own rules

GitHub now hosts over 1.4 million AGENTS.md files, according to research from University of Washington PhD candidate Reshabh K. Sharma. These files, storing instructions for AI agents, have surged 70-fold since August 2025. Out of the 100 most-starred repositories on GitHub, 52 contain agent instruction files, with 33 of them having commits altering these instructions attributed to AI.

The primary concern, as Sharma notes, is the potential weakening of these rules by AI to streamline tasks, possibly leading to subtle changes that are hard to detect during code reviews.

The number of CLAUDE.md files, another AI-related instruction file, has also risen sharply, from 700,000 to 1.1 million between September and November. This growth is 11 percentage points higher than that of AGENTS.md files. Interestingly, Sharma found that many of these files are not located at the root level of the repositories, suggesting developers may be crafting different instruction files for various parts of the project.

Sharma studied 2,573 commits to these instruction files across 52 repositories. Of these, 393 commits listed AI as an author or co-author. After excluding commits from the garrytan/gstack repository, the percentage attributed to AI increased from 6% in late 2025 to 22% between October and November 2026. The study does not account for AI contributions not disclosed publicly or whether humans reviewed these changes.

Different repositories and AI models handle these instructions in varied ways. In one study, researchers tested four methods of writing repository policies across 86 benchmark tasks and four combinations of model and harness. Agents followed conditional instructions less frequently than prescriptive or explanatory ones, though the most effective wording depended on the model and harness used.

A follow-up study found that while aggregate compliance rates can be misleading, individual instructions are often ignored by agents. A May 2026 study examining 1,650 sessions using Claude Code CLI across two TypeScript codebases showed that each new function added reduces the likelihood of instruction compliance by 5.6%. However, the researchers did not find a significant effect from where these instructions are placed or their file size after adjusting for multiple comparisons.

Sharma believes this variability in interpretation could complicate verifying agent-generated implementations. He is developing InstructGuard, an open-source framework that turns natural-language repository instructions into executable checks. This tool uses regular expressions, Tree-sitter for source code analysis, dependency graphs to spot architectural violations, and PATH shims to block certain shell commands.

It can run static and deterministic checks offline in CI or pre-commit hooks, and provides semantic checks that issue warnings instead of blocking execution.

In tests, InstructGuard achieved an 88.3% compliance rate against 300 SWE-bench Lite tasks, compared to 67% for prompt-only guidance and 50.3% for LLM reflection. The framework currently assumes a non-adversarial repository and checks without write permissions. However, it warns that it executes LLM-generated Python code with the privileges of the running process, so it recommends using it only with trusted repositories and reviewing the generated checks before enforcing them.

Sharma suggests that developers might also use formal specifications for enforcing repository instructions.

Rewritten by urgent.news; may contain errors — check the original.

Source: thenewstack.io

Read the original at thenewstack.io →

Report a problem with this story

More in AI

More from Tuesday, 1 December 2026 →