Egor Urvanov

Agent rules

Harness · rules

Agent rules — short do and do-not instructions the harness loads into the agent context: always, or only when the agent touches matching files. It is a common concept: in Claude Code rules live in CLAUDE.md and the .claude/rules folder, in Cursor in .cursor/rules, in Codex in AGENTS.md. The agent treats a rule as advice; a no-exceptions prohibition is enforced with a hook.

ruleruleruleagentproject biblehow and whyalways"tests: npm test"by file masksrc/api/**on agent request"how to write migrations"derivedgo into contexta rule is advice, a ban is a hook● model, people, systems, data  ● agent and harnessShort instructions for the agent: always, or when it touches matching files

Rules and the project bible

RulesProject bible
Answershow to act herehow the project is built and why
Formshort do and do-not instructionsa connected description and principles
When the agent reads italways or when it touches matching filesbefore work, as a whole
Example"run tests with npm test""payments are a separate system we do not edit"
Where it comes fromderived from the bible and agent mistakeswritten by people who know the project

Frequently asked questions

What are agent rules?

Short “do this, don’t do that” instructions the harness loads into the agent’s context always or when the agent touches matching files.

Where do agent rules live?

In Claude Code in CLAUDE.md and path rules, in Cursor in .cursor/rules, and for other agents in AGENTS.md.

Source: Cursor Rules docs

Where it appears · 2

Related terms

Whole glossary

© 2026 Egor Urvanov