Rules are persistent instructions that shape how Devin CLI behaves in your project. They’re injected into the agent’s context at the start of every session, ensuring consistent behavior across your team. Common uses for rules include coding standards, architectural guidelines, preferred libraries, testing conventions, and project-specific constraints. To improve coding ability, speed of completion, and lower cost, we highly recommend using Skills instead whenever possible. Skills are only injected into the context when relevant. Rules and AGENTS should be kept as small as possible. Our recommended pattern is to use a rule to reference skills that the model should use in particular scenarios.Documentation Index
Fetch the complete documentation index at: https://cli.devin.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
AGENTS.md
The simplest way to add rules is with anAGENTS.md file at your project root:
Global Rules
You can also create rules that apply to every project by placing anAGENTS.md file in your user config directory:
- Linux / macOS
- Windows
AGENT.md is also supported at this location.
Supported File Names
Devin CLI reads rules from any of these files:| File | Notes |
|---|---|
AGENTS.md | Recommended |
AGENT.md | Singular alternative |
CLAUDE.md | Compatible with Claude Code |
CLAUDE.md which is read globally from ~/.claude/CLAUDE.md.
Rules From Other Tools
If you’re coming from another AI coding tool, Devin CLI can read your existing rules:Cursor
Cursor
Devin CLI reads from Activation behavior:
.cursorrules and .cursor/rules/*.md.Cursor rules support frontmatter to control activation:alwaysApply: true— Always activeglobsspecified — Active when working with matching filesdescriptiononly — Agent decides when to apply- None of the above — User must invoke manually
Windsurf
Windsurf
Devin CLI reads from Trigger values:
.windsurf/rules/*.md and .windsurf/global_rules.md.Subdirectory support: .windsurf/rules/ directories can exist at multiple levels in your project, not just the root. Rules at the workspace root are loaded at session start. Rules in subdirectories are discovered lazily — when the agent accesses files in that directory, any .windsurf/rules/ found there (and in parent directories up to the workspace root) are automatically loaded. This avoids polluting the agent’s context with rules from unrelated parts of the project.Windsurf rules support frontmatter:always_on, manual, model_decision, agent, globClaude Code
Claude Code
Devin CLI reads from the
.claude/ directory.Controlling Imports
You can enable or disable reading from specific tool formats in your config file (~/.config/devin/config.json — or %APPDATA%\devin\config.json on Windows — or .devin/config.json):
AGENTS.md is always read and cannot be disabled.
Rule Activation Types
Rules loaded from external formats may have different activation behaviors:| Type | Behavior |
|---|---|
| Always-on | Active in every session, no user action needed |
| Glob-activated | Active when the agent works with files matching specific patterns |
| Agent-decided | The agent chooses when to apply based on the rule’s description |
| User-invocable | Only active when explicitly triggered by the user |
AGENTS.md are always “always-on”.
Best Practices
Keep rules concise
Long, verbose rules dilute the agent’s attention. Focus on what matters most.
Be specific
“Use pnpm” is better than “use the right package manager”. Concrete instructions are easier to follow.
Include examples
Show the pattern you want, not just a description of it.
Version control them
Keep rules in your repo so the whole team benefits from the same guidelines.
For most common types of rules, consider using skills instead. Skills give you more control over when and how they’re applied.

