AI GlossaryGuardrails and control
Rules
Definition: Rules are instruction files, such as AGENTS.md, CLAUDE.md or Cursor rules, that an agent tool adds to the model's context, usually when a session starts.
A rules file holds standing instructions, such as build commands, coding conventions and procedures, so they do not have to be repeated in each session. AGENTS.md is an open format, a Markdown file that its site describes as “a README for agents”, and the site lists coding agents from OpenAI, Google, GitHub and others that read it (agents.md). Claude Code reads CLAUDE.md files and a .claude/rules/ folder, and its documentation describes CLAUDE.md files, together with notes Claude writes for itself, as Claude Code’s two “memory systems” (Claude Code). Cursor keeps project rules in a .cursor/rules folder and includes a rule’s contents “at the start of the model context” (Cursor). Because a model keeps nothing between requests, the tool puts these files into the context again at the start of each new session. Some rules load only when they apply, such as when the agent works on files in a given folder.
A rule is text that the model reads and interprets. Claude Code’s documentation says Claude treats these files “as context, not enforced configuration”, and that a user who wants to block an action whatever Claude decides should write a PreToolUse hook instead. It also says there is no guarantee of strict compliance, especially for vague or conflicting instructions, and that Claude “may pick one arbitrarily” when two instructions contradict each other (Claude Code). Anthropic’s best-practices page adds that a line can get lost in a long file, and that the model “can still decide not to do things, or do other things” (Claude Code best practices). Instructions given only in conversation, rather than in a file, can be lost when the conversation is compacted (Claude Code). Cursor’s documentation says that “AI guidance should not be your only security control” (Cursor). For example, an agent whose rules file sets a maximum order size may still request a larger order, and only a check in code, such as a hook, would stop it. Context rot, a separate entry, describes how a model misses more information as its context grows, which can include a rule loaded at the start of a long session.
Tim Darrah, Mangrove’s CEO, holds that a model cannot “respect” a boundary it is able to ignore, and that the harness, the software around the model, has to enforce it.
Each tool names its files differently. Anthropic announced Claude Code as a limited research preview in Claude 3.7 Sonnet and Claude Code (24 February 2025), and its documentation that day told users to “Generate a CLAUDE.md project guide with /init” (archived documentation). Accounts of AGENTS.md’s origin differ. The Linux Foundation says it was “Released by OpenAI in August 2025” (Linux Foundation), while the AGENTS.md site says it “emerged from collaborative efforts” that included OpenAI Codex, Amp, Jules from Google, Cursor and Factory (agents.md). On 9 December 2025, the Linux Foundation announced the Agentic AI Foundation with AGENTS.md, contributed by OpenAI, as one of its founding projects (Linux Foundation).
