What rules are for
Rules work best for things that should always be true in a given project:- Style and convention — “Always use
pnpm, nevernpmoryarn.” - Safety constraints — “Never delete files in
src/migrations/without an explicit user confirmation.” - Testing requirements — “Every new function must have at least one unit test.”
- Domain context — “This is a payments service. Treat all amounts as integers in the smallest currency unit (cents).”
- Tone and format — “Write commit messages in the imperative mood, 72 characters or fewer.”
Rules are enforced by including them in the agent’s system prompt — they are not a hard technical constraint like a file permission. A sufficiently adversarial prompt could still override them. Use rules to guide, not to enforce security boundaries.
Enabling the AIRules feature
AI rules are gated behind theAIRules feature flag. If you do not see a Rules section in your agent settings, contact Warp support to request access, or check whether your account plan includes this feature.
Configuring rules for a project
1
Open agent settings for the project
Navigate to Settings → AI → Rules, or open the Agent Mode input bar and click the Rules icon in the toolbar.
2
Add a rule
Click Add rule and type your instruction in the text field. Each rule is a single instruction written in plain English. Keep rules concise — one rule, one constraint.
3
Organize rules
Rules are applied in order. Put the most important constraints first. You can drag to reorder, and disable individual rules without deleting them.
4
Save and verify
Rules take effect immediately for new conversations. Start a new Agent Mode session and ask the agent to install a package — it should use
pnpm without being told.Suggested rules
When theSuggestedRules feature is enabled, Warp analyzes your repository and suggests rules based on what it finds — for example, detecting your package manager, test framework, or linting configuration and proposing matching rules automatically.
Suggested rules appear in Settings → AI → Rules → Suggestions. Review each suggestion and click Add to include it, or dismiss it if it is not applicable. Suggestions are generated once when you first open a project and again when significant changes are detected.
Rules and skills: how they interact
Rules and Skills are complementary:
When you run an agent with a skill, both the rules and the skill instructions are included in the system prompt. Rules are included first, so they take precedence in any conflict. If a skill says “write informal comments” but a rule says “write formal docstrings”, the rule wins.
Example rules
Here are some concrete examples to illustrate what effective rules look like.Package management
Package management
Testing
Testing
Migration safety
Migration safety
Branch naming
Branch naming
Domain context
Domain context
Next steps
Skills
Package reusable prompt instructions that complement your rules.
Agent Mode
Use rules and skills together in your local terminal session.
MCP servers
Extend the agent with external tools from MCP servers.
Cloud agents
Run rule-guided agents headlessly in the cloud.