The AGENTS.md Problem: Polite Suggestions vs. Executable Facts
The AGENTS.md convention has gained significant traction, with over 60,000 open-source projects adopting it as a central place for coding agents to learn build commands, style preferences, and operational boundaries. The appeal is clear: a single, predictable location for agent configuration. However, the core premise of AGENTS.md as described by its official FAQ – that it's "just standard Markdown" and that "the agent simply parses the text you provide" – reveals a fundamental flaw. This approach treats agent instructions as prose, which, by its nature, is advisory and prone to drift. Unlike executable code or tests, prose is not inherently verifiable. When an agent encounters context pressure or simply misinterprets the instructions, it can deviate from the intended behavior. The critical issue is that a document containing incorrect or outdated prose looks identical to one that is accurate. This means a stale AGENTS.md file, with its wrong build commands, missing guardrails, or dead conventions, is not just ignored; it is actively trusted and followed by the coding agent to the letter. This trust in potentially stale information is far more dangerous than an empty configuration file.
The fundamental challenge lies in the fact that AGENTS.md is treated as living documentation. While documentation is essential, it's also notoriously difficult to keep perfectly synchronized with the codebase it describes. Prose can be ambiguous, interpreted differently by humans and even more so by an AI agent. The promise of AGENTS.md is that it provides a structured way for agents to understand project specifics, but the implementation relies on human discipline to maintain accuracy. This is where the system breaks down. A developer might write a rule like "we never read process.env directly" or "these rules auto-load," but there's no built-in mechanism to enforce or verify these statements. The agent parses them, but it doesn't validate their truthfulness against the actual code. This disconnect means that the AGENTS.md file, intended as a reliable source of truth for the agent, becomes a potential source of errors. The problem isn't a lack of discipline; it's the inherent nature of relying on prose for executable instructions.

The Cache Analogy: Why Stale Data is Worse Than No Data
Consider AGENTS.md as a cache for an agent's knowledge about a project. In computing, a stale cache is often worse than an empty one. An empty cache means the system has to fetch fresh data, ensuring accuracy. A stale cache, however, serves outdated information, leading to incorrect operations, performance degradation, or outright failures, all while the system believes it's operating correctly. This is precisely the danger with AGENTS.md. When a human skims a stale README, they can often use their own judgment and skepticism to detect discrepancies. But a coding agent, by design, lacks this inherent skepticism. It trusts the AGENTS.md file implicitly. If the build command has changed, or a security guardrail has been updated, or a new convention has been adopted, the agent will proceed with the old, incorrect information. This blind obedience to potentially outdated instructions is a critical vulnerability in the agent-driven development workflow.
The solution isn't simply to write more carefully or to be more disciplined about updating the file. The underlying problem is the format itself. Relying on Markdown prose for instructions that need to be precise and verifiable is a recipe for drift. The core issue is that the AGENTS.md file rots the day it is written. Every line represents a fact that must be true about the project's execution environment, its build process, or its security policies. If these facts change, and the AGENTS.md file is not updated concurrently, the agent will operate on false premises. This isn't a minor inconvenience; it's a direct pathway to bugs, security vulnerabilities, and inefficient development cycles. The trust an agent places in this file demands a higher standard of verifiability than standard documentation typically provides.
Making AGENTS.md Executable: Tracing Facts to Verifiable Sources
The path forward requires a shift in how AGENTS.md is constructed and maintained. Instead of treating it as a natural language description, each line within the AGENTS.md file must be treated as a factual assertion that can be independently verified. This means that every instruction, every rule, every convention specified must have a traceable link to a concrete, executable artifact within the project. For instance, a build command listed in AGENTS.md should not just be stated; it should be directly executable and, ideally, testable. If the file states "run make self-audit", the system should be able to execute that command and verify its success. If it states "these rules auto-load," there should be an underlying mechanism that demonstrably loads those rules, perhaps through a script or a configuration check that the agent can query.
This approach transforms AGENTS.md from a set of polite suggestions into a set of verifiable facts. Think of it less like a project's mission statement and more like a unit test suite for your agent's understanding of the project. Each assertion must be grounded in reality. This could involve generating parts of the AGENTS.md file programmatically based on actual project configuration, or implementing checks that an agent can run to confirm the validity of the information. For example, a rule about not reading process.env directly could be backed by a linthook or a static analysis rule that the agent can invoke to confirm compliance. The goal is to eliminate the ambiguity of prose and replace it with the certainty of code and tests. When an agent trusts AGENTS.md, it should be trusting a file where every statement is backed by code that proves it, ensuring that the agent's actions are always aligned with the project's actual state.
The Future: Verifiable Instructions and Agent Trust
The ultimate aim is to build a system where the trust an agent places in its AGENTS.md file is justified because the file's contents are dynamically verifiable. This means moving beyond static Markdown files and exploring methods for generating or validating these instructions. Tools could be developed to parse project configurations, test execution paths, and even static analysis results, and then use this information to construct or update the AGENTS.md file. Alternatively, the agent itself could be tasked with running verification checks against the instructions provided. For example, before executing a build command, the agent could first attempt to run a minimal version of that command or check for its existence and parameters. This makes the AGENTS.md file not just a configuration document but an integral part of the project's automated testing and validation suite. What nobody has addressed yet is the precise technical architecture that would enable this level of dynamic verification without introducing significant overhead or complexity for developers. Without this, the promise of reliable AI-assisted coding remains hampered by the unreliability of its configuration.
