intellectronica/ruler

Ruler — apply the same rules to all coding agents

What it solves

Managing instructions for AI coding assistants is difficult because every tool (e.g., Cursor, Claude Code, Aider, GitHub Copilot) uses different configuration files and formats. This leads to inconsistent guidance, duplicated effort, and "context drift" as project requirements change. Ruler provides a single source of truth for all your AI instructions, automatically distributing them to the correct configuration files for each agent.

How it works

Ruler uses a central .ruler/ directory in your project where you store your AI instructions as Markdown files. When you run the ruler apply command, the tool aggregates these rules and injects them into the specific configuration files required by your chosen AI agents. It supports nested rule loading, allowing you to define global rules at the project root and override or extend them with component-specific rules in subdirectories (like src/ or tests/).

Who it’s for

This tool is designed for developers and teams who use multiple AI-assisted coding tools and want to maintain a consistent set of project guidelines, coding standards, and architectural constraints across all of them without manual configuration updates.

Highlights

  • Centralized Management: Keep all AI instructions in one place using standard Markdown files.
  • Broad Agent Support: Compatible with dozens of popular AI coding agents including Cursor, Aider, Claude Code, and GitHub Copilot.
  • Nested Configuration: Supports hierarchical rule loading, perfect for monorepos or complex projects with distinct components.
  • Automated Workflow: Automatically handles MCP (Model Context Protocol) server settings and updates .gitignore to keep generated files out of version control.
  • Safe Reversion: Includes a revert command to easily roll back changes and restore original configurations.

Related

  • Project
  • Project
  • Project
  • Project
  • Project