.roorules is a configuration file for the Roo Code AI coding assistant that supplies project-specific rules, conventions, and custom instructions the agent follows when reading and editing a codebase.
.roorules
.roorules is a plain-text configuration file that tells Roo Code, an open-source AI coding assistant, how to behave inside a specific project. Placed at the repository root, it carries project-scoped instructions — coding conventions, architectural constraints, preferred libraries, and things the agent should never do — that get injected into the assistant’s context on every task. It is Roo Code’s answer to the same problem other agents solve with files like AGENTS.md or CLAUDE.md: giving an AI durable, versioned guidance instead of repeating yourself in every prompt.
- Project-scoped rules - Committed to the repo, so every contributor’s agent works from the same conventions.
- Custom instructions - Encodes style, patterns, and guardrails the assistant applies without being reminded.
- Mode-aware guidance - Roo Code supports rules that can be tailored to different operating modes and workflows.
- Versioned and reviewable - Because it lives in source control, the agent’s guidance is auditable and evolves through normal pull-request review.
In API operations, a file like .roorules is part of the emerging layer of agent-facing governance — the machine-readable contract that keeps AI-assisted coding aligned with a team’s standards. As more API design, client generation, and refactoring work is handed to coding agents, these rules files are where organizations encode expectations about authentication handling, error patterns, and spec conventions so the agent’s output stays consistent and safe. It sits alongside the broader shift toward agent-native repositories where humans and AI share the same declared rules of the road.