Supports Scoped Instructions
The ability to apply custom instructions at different levels, such as globally, project-wide, or to specific files or contexts.
Overview
Scoped instructions allow developers to define custom coding rules that apply at various levels of granularity, from global preferences (e.g., across all projects) to project-specific or file-specific rules. This feature supports flexibility in enforcing standards, accommodating diverse project requirements or team workflows. Scoping is often achieved through configuration files, settings, or metadata like glob patterns.
Why It Matters
Different projects or parts of a codebase may require distinct coding standards. Scoped instructions enable developers to tailor AI behavior to these needs, ensuring consistency and relevance. This is crucial for teams with mixed-language projects or varying style guides across repositories.
Common Use Cases
- ▸Applying global naming conventions across all projects for a developer
- ▸Enforcing project-specific rules, like using Tailwind CSS in a front-end repo
- ▸Setting file-specific instructions, such as TypeScript rules for `.ts` files
- ▸Adapting instructions for different team members’ preferences
- ▸Managing legacy codebases with unique standards separate from modern code
Agent Support
| Agent | Support Level | Notes | Actions |
|---|---|---|---|
| Cline | ✅ Full Support | Supports workspace rules (.clinerules/) and global rules (Documents/Cline/Rules on Windows, ~/Documents/Cline/Rules on macOS/Linux). | |
| Cursor | ✅ Full Support | Supports global and project-specific instructions via .cursorrules, allowing flexible rule application. | |
| Devin Desktop | ✅ Full Support | Rules can be defined at global, workspace, and system (enterprise) levels, alongside auto-generated memories. | |
| Gemini CLI | ✅ Full Support | Context is hierarchical: a global ~/.gemini/GEMINI.md, workspace GEMINI.md files, and just-in-time directory-level files are concatenated. | |
| GitHub Copilot | ✅ Full Support | Copilot supports scoped instructions at repository level (.github/copilot-instructions.md), agent-specific level, and path-specific level via multiple .instructions.md files with YAML frontmatter (generally available since November 2025). | |
| Google Antigravity | ✅ Full Support | Rules are cumulative across global (~/.gemini/AGENTS.md, ~/.gemini/GEMINI.md, ~/.gemini/config/rules/) and workspace scopes, with more specific directory-level rules taking precedence. | |
| Kiro | ✅ Full Support | Steering can be defined per workspace (.kiro/steering/) or globally (~/.kiro/steering/); workspace steering takes priority on conflicts. | |
| OpenAI Codex | ✅ Full Support | Instructions are layered: a global file in ~/.codex, then project files from the Git root down to the working directory. | |
| OpenCode | ✅ Full Support | Supports global rules in ~/.config/opencode/AGENTS.md and project rules in the project AGENTS.md. | |
| Claude Code | ⚠️ Partial | Project instructions help Claude understand the specific context and requirements for a particular project. | |
| Devin | ⚠️ Partial | Devin's Playbooks allow task-type-level instruction scoping, but not directory or file-pattern scoping. Different Playbooks can be applied to different types of tasks (e.g., frontend vs. backend). | |
| Aider | ❌ No Support | Aider applies instructions globally via CONVENTIONS.md or .aider.conf.yml. There is no mechanism for scoping instructions to specific directories, file types, or tasks. | |
| Google Jules | ❌ No Support | Jules does not support scoped or hierarchical instruction systems. Instructions are provided per-task in the task description. | |
| Replit Agent | ❌ No Support | Replit Agent does not support scoped or hierarchical instruction systems. All instructions are global to the project and provided via the agent chat. | |
| Zed AI | ❌ No Support | Zed does not provide scoped instruction mechanisms at the directory or file-type level. All instructions are global. |
Frequently Asked Questions
What are scoped instructions in AI coding agents?▼
Why is scoping important for custom instructions?▼
What happens if an agent doesn’t support scoped instructions?▼
Related Features
Dedicated Instruction File
A file that contains specific instructions, guidelines, or configurations for AI coding agents to follow when working on a project.
ConfigurationFine-Grained Instruction Control
The ability to define and apply custom instructions with high precision, targeting specific files, languages, or contexts within a codebase.
ConfigurationAutomatic Context Awareness
The capability of an AI coding agent to automatically detect and incorporate relevant context, such as open files, project structure, or custom instructions, without manual intervention.
ExecutionReady to Compare Agents?
See how different AI coding agents stack up for Supports Scoped Instructions and other features. Make an informed decision based on your specific needs.