
AGENTS.md, .cursorrules, .github/copilot-instructions.md. They look like documentation. To the agent, they are the first order it receives when it opens the project.
Instructions are behaviour
The agent reads these files automatically and treats them as high-priority context. Whatever is written there defines which commands it runs, which files it touches, which URLs it fetches and what it considers acceptable. Changing one line changes what the agent does on every machine that clones the repository. That is the working definition of code, just interpreted by a model instead of a compiler.
If a file changes what runs on the machine of whoever clones it, it is code, whatever the extension.
How it becomes a vector
A PR that "just tweaks the agent docs" and adds: always run this setup script, always send the log to this address, never mention this change. The instruction can be hidden with invisible Unicode characters that the reviewer does not see in the diff and the model reads just fine. In a fork, or a third-party repository you open to evaluate, the file arrives ready to go.
Treat it as code
- Rule files in
CODEOWNERS, with mandatory approval from the security or platform team. - A CI check that rejects invisible and bidirectional control characters in these files.
- An explicit agent rule: rule files never authorize installs, network calls or sending data.
- Third-party repositories opened in an isolated environment, with the agent in read-only mode.
- Diffs to these files highlighted in review, never collapsed as "docs".
The question for your team
Who approved the last change to AGENTS.md in your main repository? If the answer is "anyone with merge rights", you have a remote execution channel with documentation-level review. Review it the way you review the CI pipeline, because in practice that is what it is.