Skip to main content
AI rules are project-level instructions that Warp’s agent follows in every session — without you having to include them in each prompt. Where a Skill packages up a reusable prompt you invoke by name, rules are always active: as long as you are working in a project that has rules configured, the agent applies them automatically. Rules are the right tool for team-wide conventions, non-negotiable constraints, and the kind of guidance that should never be forgotten.

What rules are for

Rules work best for things that should always be true in a given project:
  • Style and convention — “Always use pnpm, never npm or yarn.”
  • 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 the AIRules 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.
Always use pnpm, not npm or yarn, for package management.
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 the SuggestedRules 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.
Suggested rules are a good starting point, but you should always review them before enabling. An inferred rule might be correct in most cases but wrong for your specific workflow.

Rules and skills: how they interact

Rules and Skills are complementary:
RulesSkills
When appliedAlways, in every sessionOnly when explicitly invoked
ScopeProject-widePer run or per session
Stored inWarp settings (per project)SKILL.md files on disk
Best forNon-negotiable constraintsReusable task templates
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.
Always use pnpm for package management. Never run npm install or yarn add.
Every new exported function must have at least one test in the corresponding *.test.ts file. Do not mark a task complete if tests are missing.
Never modify or delete files under db/migrations/. If a migration change is needed, create a new migration file instead.
When creating a new branch, use the format: <type>/<short-description> where type is one of: feat, fix, chore, docs, refactor.
This service processes financial transactions. All monetary amounts are stored as integers in cents (USD). Never use floating-point arithmetic for money calculations.

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.

Build docs developers (and LLMs) love