intellectronica/ruler

Ruler — apply the same rules to all coding agents

What it solves

Managing instructions for multiple AI coding assistants (such as GitHub Copilot, Cursor, and Claude) often leads to inconsistent guidance, duplicated effort across multiple configuration files, and context drift. Ruler provides a single source of truth for these instructions, ensuring all AI agents in a project follow the same rules regardless of the tool being used.

How it works

Ruler centralizes AI instructions in a .ruler/ directory using Markdown files. When the apply command is run, it concatenates these rules and automatically distributes them into the specific configuration files required by various supported AI agents. It supports nested rule loading, allowing developers to place .ruler/ directories in subdirectories to provide context-specific instructions for different project components (e.g., separate rules for frontend and backend).

Who it’s for

Developers and teams working with multiple AI coding tools who want to maintain consistent AI behavior and project-specific guidelines across their entire codebase.

Highlights

  • Centralized Management: Store all instructions in one place using Markdown.
  • Wide Agent Support: Compatible with a vast array of tools including GitHub Copilot, Claude Code, Cursor, Windsurf, Aider, and many others.
  • Nested Rule Loading: Support for complex project structures and monorepos via recursive .ruler/ directory discovery.
  • MCP Server Propagation: Manages and distributes Model Context Protocol (MCP) server settings across agents.
  • Automation: Automatically updates .gitignore to keep generated agent config files out of version control.

Related

  • Project
  • Project
  • Project
  • Project
  • Project