Skip to content

SOP 003: Rules Configuration

Fresh
FieldValue
SOP IDSOP-003
Version1.0
StatusActive
Sourcedocs.warp.dev/agent-platform/capabilities/rules

Overview

Rules are reusable guidelines that inform how agents respond to your prompts. They ensure agents follow your coding standards, project conventions, and personal preferences.

Rule Types

TypeScopeStorageBest For
Global RulesAll projectsWarp settingsCoding standards, workspace-wide guidelines
Project RulesCurrent projectAGENTS.md in repoProject-specific workflows, team standards

Procedure

Step 1: Create Global Rules

From Warp Drive:

  1. Open Warp Drive: CMD+\ (macOS) or CTRL+SHIFT+\ (Windows/Linux)
  2. Navigate to Personal > Rules > Global
  3. Add rules with optional name and description

From Slash Commands:

  • Type /add-rule in Agent or Auto mode

Example global rules:

  • "Always use TypeScript strict mode"
  • "Prefer functional components over class components"
  • "Use snake_case for database column names"

Step 2: Create Project Rules

Using /init command:

  1. Navigate to your project directory
  2. Type /init in Agent or Auto mode
  3. Warp generates an AGENTS.md file with initial context

Manually:

Create AGENTS.md in your project root:

markdown
# Project Rules

## Code Style
- Use ESLint with Airbnb config
- Prefer const over let
- Maximum line length: 100 characters

## Architecture
- Follow MVC pattern
- All API routes in src/routes/
- Database queries in src/models/

## Testing
- Write unit tests for all utility functions
- Use Jest with React Testing Library
- Minimum 80% code coverage

WARNING

The filename must be ALL CAPS: AGENTS.md, not agents.md or Agents.md.

Step 3: Add Subdirectory Rules

For monorepos or large projects, add rules to subdirectories:

project/
  api/
    AGENTS.md      # API-specific rules
  ui/
    AGENTS.md      # UI-specific rules
  AGENTS.md        # Project-wide rules

Step 4: Understand Rules Precedence

Step 5: Verify Rules Are Applied

When agents use rules, they appear under References in the conversation or are marked as "derived from a specific rule."

Compatible Rule Files

Warp supports linking these existing rule files to AGENTS.md:

FileTool
WARP.mdWarp (legacy)
CLAUDE.mdClaude Code
.cursorrulesCursor
AGENT.mdGeneric
GEMINI.mdGemini
.clinerulesCline
.windsurfrulesWindsurf
.github/copilot-instructions.mdGitHub Copilot

Accessing Rules

MethodPath
Warp DrivePersonal > Rules
Command PaletteSearch "Open AI Rules"
SettingsSettings > AI > Knowledge > Manage Rules
macOS MenuAI > Open Rules
Slash Command/open-project-rules

Verification Checklist

  • [ ] Global rules visible in Warp Drive > Personal > Rules > Global
  • [ ] AGENTS.md file exists in project root (ALL CAPS)
  • [ ] Agent responses reflect rule guidelines
  • [ ] Subdirectory rules override root rules correctly

Troubleshooting

IssueSolution
Rules not appliedCheck filename is ALL CAPS: AGENTS.md
Wrong rules loadedVerify current working directory with pwd
Rules conflictCheck precedence: subdirectory > root > global

See Also