[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-73811":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":23,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":36,"readmeContent":37,"aiSummary":38,"trendingCount":16,"starSnapshotCount":16,"syncStatus":39,"lastSyncTime":40,"discoverSource":41},73811,"ruler","intellectronica\u002Fruler","intellectronica","Ruler — apply the same rules to all coding agents","https:\u002F\u002Fokigu.com\u002Fruler",null,"TypeScript",2737,145,11,3,0,8,13,49,24,85.89,"MIT License",false,"main",true,[27,28,29,30,31,32,33,34,35],"agents","ai","aider","claude-code","codex","cursor","github-copilot","vibe-coding","windsurf","2026-06-12 04:01:11","# Ruler: Centralise Your AI Coding Assistant Instructions\n\n\u003Ctable style=\"width:100%\">\n  \u003Ctr>\n    \u003Ctd style=\"vertical-align: top;\">\n      \u003Cp>\n        \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fintellectronica\u002Fruler\u002Factions\u002Fworkflows\u002Fci.yml\">\u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fintellectronica\u002Fruler\u002Factions\u002Fworkflows\u002Fci.yml\u002Fbadge.svg\" alt=\"CI\">\u003C\u002Fa>\n        \u003Ca href=\"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@intellectronica\u002Fruler\">\u003Cimg src=\"https:\u002F\u002Fbadge.fury.io\u002Fjs\u002F%40intellectronica%2Fruler.svg\" alt=\"npm version\">\u003C\u002Fa>\n        \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-yellow.svg\" alt=\"License: MIT\">\n      \u003C\u002Fp>\n      \u003Cul>\n        \u003Cli>\u003Cstrong>GitHub\u003C\u002Fstrong>: \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fintellectronica\u002Fruler\">intellectronica\u002Fruler\u003C\u002Fa>\u003C\u002Fli>\n        \u003Cli>\u003Cstrong>NPM\u003C\u002Fstrong>: \u003Ca href=\"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@intellectronica\u002Fruler\">@intellectronica\u002Fruler\u003C\u002Fa>\u003C\u002Fli>\n      \u003C\u002Ful>\n      \u003Chr \u002F>\n      \u003Cp>\n        \u003Cem>Animation by \u003Ca href=\"https:\u002F\u002Fisaacflath.com\u002F\">Isaac Flath\u003C\u002Fa> of \u003Cstrong>\u003Ca href=\"https:\u002F\u002Felite-ai-assisted-coding.dev\u002F\">Elite AI-Assisted Coding\u003C\u002Fa>\u003C\u002Fstrong>\u003C\u002Fem> ➡︎\n      \u003C\u002Fp>\n    \u003C\u002Ftd>\n    \u003Ctd style=\"vertical-align: top; width:33%;\">\n      \u003Cimg src=\"img\u002Fruler-short.gif\" alt=\"Ruler demo\" style=\"width:300px; height:auto; display:block;\" \u002F>\n    \u003C\u002Ftd>\n  \u003C\u002Ftr>\n\u003C\u002Ftable>\n\n---\n\n> **Beta Research Preview**\n>\n> - Please test this version carefully in your environment\n> - Report issues at https:\u002F\u002Fgithub.com\u002Fintellectronica\u002Fruler\u002Fissues\n\n## Why Ruler?\n\nManaging instructions across multiple AI coding tools becomes complex as your team grows. Different agents (GitHub Copilot, Claude, Cursor, Aider, etc.) require their own configuration files, leading to:\n\n- **Inconsistent guidance** across AI tools\n- **Duplicated effort** maintaining multiple config files\n- **Context drift** as project requirements evolve\n- **Onboarding friction** for new AI tools\n- **Complex project structures** requiring context-specific instructions for different components\n\nRuler solves this by providing a **single source of truth** for all your AI agent instructions, automatically distributing them to the right configuration files. With support for **nested rule loading**, Ruler can handle complex project structures with context-specific instructions for different components.\n\n## Core Features\n\n- **Centralised Rule Management**: Store all AI instructions in a dedicated `.ruler\u002F` directory using Markdown files\n- **Nested Rule Loading**: Support complex project structures with multiple `.ruler\u002F` directories for context-specific instructions\n- **Automatic Distribution**: Ruler applies these rules to configuration files of supported AI agents\n- **Targeted Agent Configuration**: Fine-tune which agents are affected and their specific output paths via `ruler.toml`\n- **MCP Server Propagation**: Manage and distribute Model Context Protocol (MCP) server settings\n- **`.gitignore` Automation**: Keeps generated agent config files out of version control automatically\n- **Simple CLI**: Easy-to-use commands for initialising and applying configurations\n\n## Supported AI Agents\n\n| Agent                  | Rules File(s)                                  | MCP Configuration \u002F Notes                        | Skills Support \u002F Location | Subagents Support \u002F Location |\n| ---------------------- | ---------------------------------------------- | ------------------------------------------------ | ------------------------- | ---------------------------- |\n| AGENTS.md              | `AGENTS.md`                                    | (pseudo-agent ensuring root `AGENTS.md` exists)  | -                         | -                            |\n| GitHub Copilot         | `AGENTS.md`                                    | `.vscode\u002Fmcp.json`                               | `.claude\u002Fskills\u002F`         | `.github\u002Fagents\u002F`            |\n| Claude Code            | `CLAUDE.md`                                    | `.mcp.json`                                      | `.claude\u002Fskills\u002F`         | `.claude\u002Fagents\u002F`            |\n| OpenAI Codex CLI       | `AGENTS.md`                                    | `.codex\u002Fconfig.toml`                             | `.codex\u002Fskills\u002F`          | `.codex\u002Fagents\u002F` (`.toml`)   |\n| Pi Coding Agent        | `AGENTS.md`                                    | -                                                | `.pi\u002Fskills\u002F`             | -                            |\n| Jules                  | `AGENTS.md`                                    | -                                                | -                         | -                            |\n| Cursor                 | `AGENTS.md`                                    | `.cursor\u002Fmcp.json`                               | `.cursor\u002Fskills\u002F`         | `.cursor\u002Fagents\u002F`            |\n| Windsurf               | `AGENTS.md`                                    | `.windsurf\u002Fmcp_config.json`                      | `.windsurf\u002Fskills\u002F`       | -                            |\n| Cline                  | `.clinerules`                                  | -                                                | -                         | -                            |\n| Crush                  | `CRUSH.md`                                     | `.crush.json`                                    | -                         | -                            |\n| Amp                    | `AGENTS.md`                                    | -                                                | `.agents\u002Fskills\u002F`         | -                            |\n| Antigravity            | `.agent\u002Frules\u002Fruler.md`                        | -                                                | `.agent\u002Fskills\u002F`          | -                            |\n| Amazon Q CLI           | `.amazonq\u002Frules\u002Fruler_q_rules.md`              | `.amazonq\u002Fmcp.json`                              | -                         | -                            |\n| Aider                  | `AGENTS.md`, `.aider.conf.yml`                 | `.mcp.json`                                      | -                         | -                            |\n| Firebase Studio        | `.idx\u002Fairules.md`                              | `.idx\u002Fmcp.json`                                  | -                         | -                            |\n| Open Hands             | `.openhands\u002Fmicroagents\u002Frepo.md`               | `config.toml`                                    | -                         | -                            |\n| Gemini CLI             | `AGENTS.md`                                    | `.gemini\u002Fsettings.json`                          | `.gemini\u002Fskills\u002F`         | -                            |\n| Junie                  | `.junie\u002Fguidelines.md`                         | `.junie\u002Fmcp\u002Fmcp.json`                            | `.junie\u002Fskills\u002F`          | -                            |\n| AugmentCode            | `.augment\u002Frules\u002Fruler_augment_instructions.md` | -                                                | -                         | -                            |\n| Kilo Code              | `AGENTS.md`                                    | `.kilocode\u002Fmcp.json`                             | `.claude\u002Fskills\u002F`         | -                            |\n| OpenCode               | `AGENTS.md`                                    | `opencode.json`                                  | `.opencode\u002Fskills\u002F`       | -                            |\n| Goose                  | `.goosehints`                                  | -                                                | `.agents\u002Fskills\u002F`         | -                            |\n| Qwen Code              | `AGENTS.md`                                    | `.qwen\u002Fsettings.json`                            | -                         | -                            |\n| RooCode                | `AGENTS.md`                                    | `.roo\u002Fmcp.json`                                  | `.roo\u002Fskills\u002F`            | -                            |\n| Zed                    | `AGENTS.md`                                    | `.zed\u002Fsettings.json` (project root, never $HOME) | -                         | -                            |\n| Trae AI                | `.trae\u002Frules\u002Fproject_rules.md`                 | -                                                | -                         | -                            |\n| Warp                   | `WARP.md`                                      | -                                                | -                         | -                            |\n| Kiro                   | `.kiro\u002Fsteering\u002Fruler_kiro_instructions.md`    | `.kiro\u002Fsettings\u002Fmcp.json`                        | -                         | -                            |\n| Firebender             | `firebender.json`                              | `firebender.json` (rules and MCP in same file)   | -                         | -                            |\n| Factory Droid          | `AGENTS.md`                                    | `.factory\u002Fmcp.json`                              | `.factory\u002Fskills\u002F`        | -                            |\n| Mistral Vibe           | `AGENTS.md`                                    | `.vibe\u002Fconfig.toml`                              | `.vibe\u002Fskills\u002F`           | -                            |\n| JetBrains AI Assistant | `.aiassistant\u002Frules\u002FAGENTS.md`                 | -                                                | -                         | -                            |\n\n## Getting Started\n\n### Installation\n\nRequires Node.js `^20.19.0 || ^22.12.0 || >=23`.\n\n**Global Installation (Recommended for CLI use):**\n\n```bash\nnpm install -g @intellectronica\u002Fruler\n```\n\n**Using `npx` (for one-off commands):**\n\n```bash\nnpx @intellectronica\u002Fruler apply\n```\n\n### Project Initialisation\n\n1. Navigate to your project's root directory\n2. Run `ruler init`\n3. This creates:\n\n- `.ruler\u002F` directory\n- `.ruler\u002FAGENTS.md`: The primary starter Markdown file for your rules\n- `.ruler\u002Fruler.toml`: The main configuration file for Ruler (now contains sample MCP server sections; legacy `.ruler\u002Fmcp.json` no longer scaffolded)\n- (Optional legacy fallback) If you previously used `.ruler\u002Finstructions.md`, it is still respected when `AGENTS.md` is absent. (The prior runtime warning was removed.)\n\nAdditionally, you can create a global configuration to use when no local `.ruler\u002F` directory is found:\n\n```bash\nruler init --global\n```\n\nThe global configuration will be created to `$XDG_CONFIG_HOME\u002Fruler` (default: `~\u002F.config\u002Fruler`).\n\n## Core Concepts\n\n### The `.ruler\u002F` Directory\n\nThis is your central hub for all AI agent instructions:\n\n- **Primary File Order & Precedence**:\n  1. A repository root `AGENTS.md` (outside `.ruler\u002F`) if present (highest precedence, prepended)\n  2. `.ruler\u002FAGENTS.md` (new default starter file)\n  3. Legacy `.ruler\u002Finstructions.md` (only if `.ruler\u002FAGENTS.md` absent; no longer emits a deprecation warning)\n  4. Remaining discovered `.md` files under `.ruler\u002F` (and subdirectories) in sorted order\n- **Rule Files (`*.md`)**: Discovered recursively from `.ruler\u002F` or `$XDG_CONFIG_HOME\u002Fruler` and concatenated in the order above\n- **Concatenation Marker**: Each file's content is prepended with `\u003C!-- Source: \u003Crelative_path_to_md_file> -->` for traceability\n- **`ruler.toml`**: Master configuration for Ruler's behavior, agent selection, output paths, and MCP server settings\n- **`mcp.json`**: (Legacy, deprecated) Shared MCP server settings - no longer scaffolded but still supported for backward compatibility\n\nThis ordering lets you keep a short, high-impact root `AGENTS.md` (e.g. executive project summary) while housing detailed guidance inside `.ruler\u002F`.\n\n### Nested Rule Loading\n\nRuler now supports **nested rule loading** with the `--nested` flag, enabling context-specific instructions for different parts of your project:\n\n```\nproject\u002F\n├── .ruler\u002F           # Global project rules\n│   ├── AGENTS.md\n│   └── coding_style.md\n├── src\u002F\n│   └── .ruler\u002F       # Component-specific rules\n│       └── api_guidelines.md\n├── tests\u002F\n│   └── .ruler\u002F       # Test-specific rules\n│       └── testing_conventions.md\n└── docs\u002F\n    └── .ruler\u002F       # Documentation rules\n        └── writing_style.md\n```\n\n**How it works:**\n\n- Discover all `.ruler\u002F` directories in the project hierarchy\n- Load and concatenate rules from each directory in order\n- Decide whether nested mode is enabled using the following precedence:\n  1. `ruler apply --nested` (or `--no-nested`) takes top priority\n  2. `nested = true` in `ruler.toml`\n  3. Default to disabled when neither option is provided\n- When a run is nested, downstream configs are forced to keep `nested = true`. If a child config attempts to disable it, Ruler keeps nested processing active and emits a warning in the logs.\n- Nested processing carries forward each directory's own MCP bundle and configuration settings so that generated files remain scoped to their source directories while being normalized back to the project root.\n\n> [!CAUTION]\n> Nested mode is experimental and may change in future releases. The CLI logs this warning the first time a nested run is detected so you know the behavior may evolve.\n\n**Perfect for:**\n\n- Monorepos with multiple services\n- Projects with distinct components (frontend\u002Fbackend)\n- Teams needing different instructions for different areas\n- Complex codebases with varying standards\n\n### Best Practices for Rule Files\n\n**Granularity**: Break down complex instructions into focused `.md` files:\n\n- `coding_style.md`\n- `api_conventions.md`\n- `project_architecture.md`\n- `security_guidelines.md`\n\n**Example rule file (`.ruler\u002Fpython_guidelines.md`):**\n\n```markdown\n# Python Project Guidelines\n\n## General Style\n\n- Follow PEP 8 for all Python code\n- Use type hints for all function signatures and complex variables\n- Keep functions short and focused on a single task\n\n## Error Handling\n\n- Use specific exception types rather than generic `Exception`\n- Log errors effectively with context\n\n## Security\n\n- Always validate and sanitize user input\n- Be mindful of potential injection vulnerabilities\n```\n\n## Usage: The `apply` Command\n\n### Primary Command\n\n```bash\nruler apply [options]\n```\n\nThe `apply` command looks for `.ruler\u002F` in the current directory tree, reading the first match. If no such directory is found, it will look for a global configuration in `$XDG_CONFIG_HOME\u002Fruler`.\n\n### Options\n\n| Option                         | Description                                                            |\n| ------------------------------ | ---------------------------------------------------------------------- |\n| `--project-root \u003Cpath>`        | Project root path (default: current directory).                        |\n| `--agents \u003Cagent1,agent2,...>` | Comma-separated agent names to target (see supported list below).      |\n| `--config \u003Cpath>`              | Custom `ruler.toml` path.                                              |\n| `--mcp` \u002F `--with-mcp`         | Enable applying MCP server configurations (default: true).             |\n| `--no-mcp`                     | Disable applying MCP server configurations.                            |\n| `--mcp-overwrite`              | Overwrite native MCP config instead of merging.                        |\n| `--gitignore`                  | Enable automatic .gitignore updates (default: true).                   |\n| `--no-gitignore`               | Disable automatic .gitignore updates.                                  |\n| `--gitignore-local`            | Write managed ignore entries to `.git\u002Finfo\u002Fexclude` instead.           |\n| `--nested`                     | Enable nested rule loading (default: inherit from config or disabled). |\n| `--no-nested`                  | Disable nested rule loading even if `nested = true` in config.         |\n| `--backup`                     | Enable creation of `.bak` backup files (default: enabled).             |\n| `--no-backup`                  | Disable creation of `.bak` backup files.                               |\n| `--skills`                     | Enable skills support (experimental, default: enabled).                |\n| `--no-skills`                  | Disable skills support.                                                |\n| `--subagents`                  | Enable subagents support (experimental, default: disabled).            |\n| `--no-subagents`               | Disable subagents support.                                             |\n| `--dry-run`                    | Preview changes without writing files.                                 |\n| `--local-only`                 | Skip `$XDG_CONFIG_HOME` when looking for configuration.                |\n| `--verbose` \u002F `-v`             | Display detailed output during execution.                              |\n\n### Common Examples\n\n**Apply rules to all configured agents:**\n\n```bash\nruler apply\n```\n\n**Apply rules only to GitHub Copilot and Claude:**\n\n```bash\nruler apply --agents copilot,claude\n```\n\n**Apply rules only to Firebase Studio:**\n\n```bash\nruler apply --agents firebase\n```\n\n**Apply rules only to Warp:**\n\n```bash\nruler apply --agents warp\n```\n\n**Apply rules only to Trae AI:**\n\n```bash\nruler apply --agents trae\n```\n\n**Apply rules only to RooCode:**\n\n```bash\nruler apply --agents roo\n```\n\n**Use a specific configuration file:**\n\n```bash\nruler apply --config .\u002Fteam-configs\u002Fruler.frontend.toml\n```\n\n**Apply rules with verbose output:**\n\n```bash\nruler apply --verbose\n```\n\n**Apply rules but skip MCP and .gitignore updates:**\n\n```bash\nruler apply --no-mcp --no-gitignore\n```\n\n## Usage: The `revert` Command\n\nThe `revert` command safely undoes all changes made by `ruler apply`, restoring your project to its pre-ruler state. It intelligently restores files from backups (`.bak` files) when available, or removes generated files that didn't exist before.\n\n### Why Revert is Needed\n\nWhen experimenting with different rule configurations or switching between projects, you may want to:\n\n- **Clean slate**: Remove all ruler-generated files to start fresh\n- **Restore originals**: Revert modified files back to their original state\n- **Selective cleanup**: Remove configurations for specific agents only\n- **Safe experimentation**: Try ruler without fear of permanent changes\n\n### Primary Command\n\n```bash\nruler revert [options]\n```\n\n### Options\n\n| Option                         | Description                                                                                                                                                                                                                                                                                                                    |\n| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| `--project-root \u003Cpath>`        | Path to your project's root (default: current directory)                                                                                                                                                                                                                                                                       |\n| `--agents \u003Cagent1,agent2,...>` | Comma-separated list of agent names to revert (agentsmd, aider, amazonqcli, amp, antigravity, augmentcode, claude, cline, codex, copilot, crush, cursor, factory, firebase, firebender, gemini-cli, goose, jetbrains-ai, jules, junie, kilocode, kiro, mistral, opencode, openhands, pi, qwen, roo, trae, warp, windsurf, zed) |\n| `--config \u003Cpath>`              | Path to a custom `ruler.toml` configuration file                                                                                                                                                                                                                                                                               |\n| `--keep-backups`               | Keep backup files (.bak) after restoration (default: false)                                                                                                                                                                                                                                                                    |\n| `--dry-run`                    | Preview changes without actually reverting files                                                                                                                                                                                                                                                                               |\n| `--verbose` \u002F `-v`             | Display detailed output during execution                                                                                                                                                                                                                                                                                       |\n| `--local-only`                 | Only search for local .ruler directories, ignore global config                                                                                                                                                                                                                                                                 |\n\n### Common Examples\n\n**Revert all ruler changes:**\n\n```bash\nruler revert\n```\n\n**Preview what would be reverted (dry-run):**\n\n```bash\nruler revert --dry-run\n```\n\n**Revert only specific agents:**\n\n```bash\nruler revert --agents claude,copilot\n```\n\n**Revert with detailed output:**\n\n```bash\nruler revert --verbose\n```\n\n**Keep backup files after reverting:**\n\n```bash\nruler revert --keep-backups\n```\n\n## Configuration (`ruler.toml`) in Detail\n\n### Location\n\nDefaults to `.ruler\u002Fruler.toml` in the project root. Override with `--config` CLI option.\n\n### Complete Example\n\n```toml\n# Default agents to run when --agents is not specified\n# Uses case-insensitive substring matching\ndefault_agents = [\"copilot\", \"claude\", \"aider\"]\n\n# --- Global MCP Server Configuration ---\n[mcp]\n# Enable\u002Fdisable MCP propagation globally (default: true)\nenabled = true\n# Global merge strategy: 'merge' or 'overwrite' (default: 'merge')\nmerge_strategy = \"merge\"\n\n# --- MCP Server Definitions ---\n[mcp_servers.filesystem]\ncommand = \"npx\"\nargs = [\"-y\", \"@modelcontextprotocol\u002Fserver-filesystem\", \"\u002Fpath\u002Fto\u002Fproject\"]\n\n[mcp_servers.git]\ncommand = \"npx\"\nargs = [\"-y\", \"@modelcontextprotocol\u002Fserver-git\", \"--repository\", \".\"]\n\n[mcp_servers.remote_api]\nurl = \"https:\u002F\u002Fapi.example.com\"\n\n[mcp_servers.remote_api.headers]\nAuthorization = \"Bearer your-token\"\n\n# --- Global .gitignore Configuration ---\n[gitignore]\n# Enable\u002Fdisable automatic .gitignore updates (default: true)\nenabled = true\n# Write managed entries to .git\u002Finfo\u002Fexclude instead of .gitignore (default: false)\nlocal = false\n\n# --- Agent-Specific Configurations ---\n[agents.copilot]\nenabled = true\n\n[agents.claude]\nenabled = true\noutput_path = \"CLAUDE.md\"\n\n[agents.aider]\nenabled = true\noutput_path_instructions = \"AGENTS.md\"\noutput_path_config = \".aider.conf.yml\"\n\n# OpenAI Codex CLI agent and MCP config\n[agents.codex]\nenabled = true\noutput_path = \"AGENTS.md\"\noutput_path_config = \".codex\u002Fconfig.toml\"\n\n# Agent-specific MCP configuration for Codex CLI\n[agents.codex.mcp]\nenabled = true\nmerge_strategy = \"merge\"\n\n[agents.firebase]\nenabled = true\noutput_path = \".idx\u002Fairules.md\"\n\n[agents.gemini-cli]\nenabled = true\n\n[agents.jules]\nenabled = true\n\n[agents.junie]\nenabled = true\noutput_path = \".junie\u002Fguidelines.md\"\n\n[agents.junie.mcp]\nenabled = true\nmerge_strategy = \"merge\"\n\n# Agent-specific MCP configuration\n[agents.cursor.mcp]\nenabled = true\nmerge_strategy = \"merge\"\n\n# Disable specific agents\n[agents.windsurf]\nenabled = false\n\n[agents.kilocode]\nenabled = true\noutput_path = \"AGENTS.md\"\n\n[agents.warp]\nenabled = true\noutput_path = \"WARP.md\"\n```\n\n### Configuration Precedence\n\n1. **CLI flags** (e.g., `--agents`, `--no-mcp`, `--mcp-overwrite`, `--no-gitignore`)\n2. **Settings in `ruler.toml`** (`default_agents`, specific agent settings, global sections)\n3. **Ruler's built-in defaults** (all agents enabled, standard output paths, MCP enabled with 'merge')\n\n## MCP (Model Context Protocol) Server Configuration\n\nMCP provides broader context to AI models through server configurations. Ruler can manage and distribute these settings across compatible agents.\n\n### TOML Configuration (Recommended)\n\nYou can now define MCP servers directly in `ruler.toml` using the `[mcp_servers.\u003Cname>]` syntax:\n\n```toml\n# Global MCP behavior\n[mcp]\nenabled = true\nmerge_strategy = \"merge\"  # or \"overwrite\"\n\n# Local (stdio) server\n[mcp_servers.filesystem]\ncommand = \"npx\"\nargs = [\"-y\", \"@modelcontextprotocol\u002Fserver-filesystem\", \"\u002Fpath\u002Fto\u002Fproject\"]\n\n[mcp_servers.filesystem.env]\nAPI_KEY = \"your-api-key\"\n\n# Remote server\n[mcp_servers.search]\nurl = \"https:\u002F\u002Fmcp.example.com\"\n\n[mcp_servers.search.headers]\nAuthorization = \"Bearer your-token\"\n\"X-API-Version\" = \"v1\"\n```\n\n### Legacy `.ruler\u002Fmcp.json` (Deprecated)\n\nFor backward compatibility, you can still use the JSON format; a warning is issued encouraging migration to TOML. The file is no longer created during `ruler init`.\n\n```json\n{\n  \"mcpServers\": {\n    \"filesystem\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"-y\",\n        \"@modelcontextprotocol\u002Fserver-filesystem\",\n        \"\u002Fpath\u002Fto\u002Fproject\"\n      ]\n    },\n    \"git\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@modelcontextprotocol\u002Fserver-git\", \"--repository\", \".\"]\n    }\n  }\n}\n```\n\n### Configuration Precedence\n\nWhen both TOML and JSON configurations are present:\n\n1. **TOML servers take precedence** over JSON servers with the same name\n2. **Servers are merged** from both sources (unless using overwrite strategy)\n3. **Deprecation warning** is shown encouraging migration to TOML (warning shown once per run)\n\n### Server Types\n\n**Local\u002Fstdio servers** require a `command` field:\n\n```toml\n[mcp_servers.local_server]\ncommand = \"node\"\nargs = [\"server.js\"]\n\n[mcp_servers.local_server.env]\nDEBUG = \"1\"\n```\n\n**Remote servers** require a `url` field (headers optional; bearer Authorization token auto-extracted for OpenHands when possible):\n\n```toml\n[mcp_servers.remote_server]\nurl = \"https:\u002F\u002Fapi.example.com\"\n\n[mcp_servers.remote_server.headers]\nAuthorization = \"Bearer token\"\n```\n\nRuler uses this configuration with the `merge` (default) or `overwrite` strategy, controlled by `ruler.toml` or CLI flags.\n\n**Home Directory Safety:** Ruler never writes MCP configuration files outside your project root. Any historical references to user home directories (e.g. `~\u002F.codeium\u002Fwindsurf\u002Fmcp_config.json` or `~\u002F.zed\u002Fsettings.json`) have been removed; only project-local paths are targeted.\n\n**Note for OpenAI Codex CLI:** To apply the local Codex CLI MCP configuration, set the `CODEX_HOME` environment variable to your project’s `.codex` directory:\n\n```bash\nexport CODEX_HOME=\"$(pwd)\u002F.codex\"\n```\n\n## Skills Support (Experimental)\n\n**⚠️ Experimental Feature**: Skills support is currently experimental. Skills are only propagated to agents with native skills support; other agents are skipped with a warning.\n\nRuler can manage and propagate skills to supported AI agents. Skills are stored in `.ruler\u002Fskills\u002F` and are automatically distributed to compatible agents when you run `ruler apply`.\n\n### How It Works\n\nSkills are specialized knowledge packages that extend AI agent capabilities with domain-specific expertise, workflows, or tool integrations. Ruler discovers skills in your `.ruler\u002Fskills\u002F` directory and propagates them to compatible agents:\n\n- **Agents with native skills support**: Skills are copied directly to each agent's native skills directory:\n  - **Claude Code**: `.claude\u002Fskills\u002F`\n  - **GitHub Copilot**: `.claude\u002Fskills\u002F` (shared with Claude Code)\n  - **Kilo Code**: `.claude\u002Fskills\u002F` (shared with Claude Code)\n  - **OpenAI Codex CLI**: `.codex\u002Fskills\u002F`\n  - **OpenCode**: `.opencode\u002Fskills\u002F`\n  - **Pi Coding Agent**: `.pi\u002Fskills\u002F`\n  - **Goose**: `.agents\u002Fskills\u002F`\n  - **Amp**: `.agents\u002Fskills\u002F` (shared with Goose)\n  - **Antigravity**: `.agent\u002Fskills\u002F`\n  - **Factory Droid**: `.factory\u002Fskills\u002F`\n  - **Mistral Vibe**: `.vibe\u002Fskills\u002F`\n  - **Roo Code**: `.roo\u002Fskills\u002F`\n  - **Gemini CLI**: `.gemini\u002Fskills\u002F`\n  - **Junie**: `.junie\u002Fskills\u002F`\n  - **Cursor**: `.cursor\u002Fskills\u002F`\n  - **Windsurf**: `.windsurf\u002Fskills\u002F`\n\n### Skills Directory Structure\n\nSkills can be organized flat or nested:\n\n```\n.ruler\u002Fskills\u002F\n├── my-skill\u002F\n│   ├── SKILL.md           # Required: skill instructions\u002Fknowledge\n│   ├── helper.py          # Optional: additional resources (scripts)\n│   └── reference.md       # Optional: additional resources (docs)\n└── another-skill\u002F\n    └── SKILL.md\n```\n\nEach skill must contain:\n\n- `SKILL.md` - Primary skill file with instructions or knowledge base\n\nSkills can optionally include additional resources like:\n\n- Markdown files with supplementary documentation\n- Python, JavaScript, or other scripts\n- Configuration files or data\n\n### Configuration\n\nSkills support is **enabled by default** but can be controlled via:\n\n**CLI flags:**\n\n```bash\n# Enable skills (default)\nruler apply --skills\n\n# Disable skills\nruler apply --no-skills\n```\n\n**Configuration in `ruler.toml`:**\n\n```toml\n[skills]\nenabled = true  # or false to disable\n```\n\n### Non-native Agents\n\nIf you run Ruler for agents that do not support native skills, Ruler logs a warning and skips skills propagation for those agents.\n\n### `.gitignore` Integration\n\nWhen skills support is enabled and gitignore integration is active, Ruler automatically adds:\n\n- `.claude\u002Fskills\u002F` (for Claude Code, GitHub Copilot, and Kilo Code)\n- `.codex\u002Fskills\u002F` (for OpenAI Codex CLI)\n- `.opencode\u002Fskills\u002F` (for OpenCode)\n- `.pi\u002Fskills\u002F` (for Pi Coding Agent)\n- `.agents\u002Fskills\u002F` (for Goose and Amp)\n- `.agent\u002Fskills\u002F` (for Antigravity)\n- `.factory\u002Fskills\u002F` (for Factory Droid)\n- `.vibe\u002Fskills\u002F` (for Mistral Vibe)\n- `.roo\u002Fskills\u002F` (for Roo Code)\n- `.gemini\u002Fskills\u002F` (for Gemini CLI)\n- `.junie\u002Fskills\u002F` (for Junie)\n- `.cursor\u002Fskills\u002F` (for Cursor)\n- `.windsurf\u002Fskills\u002F` (for Windsurf)\n\nto your `.gitignore` file within the managed Ruler block.\n\n### Requirements\n\n- **For agents with native skills support** (Claude Code, GitHub Copilot, Kilo Code, OpenAI Codex CLI, OpenCode, Pi Coding Agent, Goose, Amp, Antigravity, Factory Droid, Mistral Vibe, Roo Code, Gemini CLI, Junie, Cursor, Windsurf): No additional requirements.\n\n### Validation\n\nRuler validates discovered skills and issues warnings for:\n\n- Missing required file (`SKILL.md`)\n- Invalid directory structures (directories without `SKILL.md` and no sub-skills)\n\nWarnings don't prevent propagation but help identify potential issues.\n\n### Dry-Run Mode\n\nTest skills propagation without making changes:\n\n```bash\nruler apply --dry-run\n```\n\nThis shows which skills would be copied.\n\n### Example Workflow\n\n```bash\n# 1. Add a skill to your project\nmkdir -p .ruler\u002Fskills\u002Fmy-skill\ncat > .ruler\u002Fskills\u002Fmy-skill\u002FSKILL.md \u003C\u003C 'EOF'\n# My Custom Skill\n\nThis skill provides specialized knowledge for...\n\n## Usage\n\nWhen working on this project, always follow these guidelines:\n- Use TypeScript for all new code\n- Write tests for all features\n- Follow the existing code style\nEOF\n\n# 2. Apply to all agents (skills enabled by default)\nruler apply\n\n# 3. Skills are now available to compatible agents:\n#    - Claude Code, GitHub Copilot & Kilo Code: .claude\u002Fskills\u002Fmy-skill\u002F\n#    - OpenAI Codex CLI: .codex\u002Fskills\u002Fmy-skill\u002F\n#    - OpenCode: .opencode\u002Fskills\u002Fmy-skill\u002F\n#    - Pi Coding Agent: .pi\u002Fskills\u002Fmy-skill\u002F\n#    - Goose & Amp: .agents\u002Fskills\u002Fmy-skill\u002F\n#    - Antigravity: .agent\u002Fskills\u002Fmy-skill\u002F\n#    - Factory Droid: .factory\u002Fskills\u002Fmy-skill\u002F\n#    - Mistral Vibe: .vibe\u002Fskills\u002Fmy-skill\u002F\n#    - Roo Code: .roo\u002Fskills\u002Fmy-skill\u002F\n#    - Gemini CLI: .gemini\u002Fskills\u002Fmy-skill\u002F\n#    - Junie: .junie\u002Fskills\u002Fmy-skill\u002F\n#    - Cursor: .cursor\u002Fskills\u002Fmy-skill\u002F\n#    - Windsurf: .windsurf\u002Fskills\u002Fmy-skill\u002F\n```\n\n## Subagents Support (Experimental)\n\n> **⚠️ Experimental:** Subagents support is experimental and behavior may change in future releases.\n\nRuler can distribute named, delegatable **subagents** from a single source of truth (`.ruler\u002Fagents\u002F`) to each agent's native subagent location. Each source file is one Markdown file with YAML frontmatter; Ruler transforms it into the format the target agent expects.\n\n### How It Works\n\nFor agents with a native subagent primitive, Ruler writes one file per subagent into the target directory:\n\n| Agent            | Target location                      | Format                                   |\n| ---------------- | ------------------------------------ | ---------------------------------------- |\n| Claude Code      | `.claude\u002Fagents\u002F\u003Crelative-path>.md`  | Markdown + YAML frontmatter              |\n| Cursor           | `.cursor\u002Fagents\u002F\u003Crelative-path>.md`  | Markdown + YAML frontmatter              |\n| OpenAI Codex CLI | `.codex\u002Fagents\u002F\u003Crelative-path>.toml` | TOML (one self-contained file per agent) |\n| GitHub Copilot   | `.github\u002Fagents\u002F\u003Crelative-path>.md`  | Markdown + YAML frontmatter              |\n\nOther agents (Windsurf, RooCode, Aider, Gemini CLI, …) do not yet have a comparable native subagent primitive and are skipped with a warning. Subagent propagation will be added when those agents ship a comparable file format.\n\n### Source Format\n\nAuthor each subagent as `.ruler\u002Fagents\u002F\u003Cname>.md` (nested folders are supported and preserved in outputs):\n\n```markdown\n---\nname: code-reviewer\ndescription: Use PROACTIVELY after a feature\u002Ffix is implemented. Reviews against SOLID\u002FDRY\u002FKISS. Read-only.\ntools: [Read, Grep, Glob, Bash]\nmodel: inherit\nreadonly: true\nis_background: false\n---\n\n# Code Reviewer\n\nYou operate in a fresh context window with read-only access. Your job is to\nreview the diff and surrounding code against the design principles and return\na structured verdict.\n```\n\n**Required frontmatter fields:**\n\n| Field         | Type   | Notes                                                                      |\n| ------------- | ------ | -------------------------------------------------------------------------- |\n| `name`        | string | Must match the filename stem (`code-reviewer.md` → `name: code-reviewer`). |\n| `description` | string | When the parent agent should delegate to this subagent.                    |\n\n**Optional frontmatter fields:**\n\n| Field           | Type     | Used by                                                                         | Default behavior                                   |\n| --------------- | -------- | ------------------------------------------------------------------------------- | -------------------------------------------------- |\n| `tools`         | string[] | Claude (verbatim), Copilot (mapped to aliases)                                  | Cursor \u002F Codex ignore; omitted if absent.          |\n| `model`         | string   | All four targets                                                                | Cursor defaults to `inherit`; others omit.         |\n| `readonly`      | boolean  | Cursor (verbatim), Codex (`sandbox_mode`), Copilot (`disable-model-invocation`) | Defaults to `false` for Cursor; omitted otherwise. |\n| `is_background` | boolean  | Cursor only                                                                     | Defaults to `false` for Cursor.                    |\n\nFor GitHub Copilot, source `tools` (Claude vocabulary: `Read`, `Grep`, `Bash`, …) are translated to Copilot's aliases (`read`, `search`, `execute`, …). Tools that do not have a Copilot equivalent are dropped silently on a normal apply; pass `--verbose` (or use `--dry-run` to preview) to see which tools were dropped.\n\n### Configuration\n\nSubagent propagation is **disabled by default**. Opt in via CLI flag or `ruler.toml`:\n\n```bash\nruler apply --subagents   # enable subagent propagation for one run\n```\n\n```toml\n# .ruler\u002Fruler.toml\n[agents]\nenabled = true\n# include_in_rules = true  # also append .ruler\u002Fagents\u002F*.md into top-level CLAUDE.md \u002F AGENTS.md (default: false)\n# cleanup_orphaned = true   # allow ruler to delete stale native subagent dirs (default: false)\n```\n\n> **Note:** the previous release used `[subagents]` for these keys. `[subagents]` is still honored as a fallback with a deprecation warning, and will be removed in a future release. Please migrate to `[agents]`.\n\n`[agents] enabled` controls only native subagent propagation from `.ruler\u002Fagents\u002F`. It is independent from `[agents.\u003Cname>] enabled` (which toggles per-coding-agent output like `CLAUDE.md` \u002F `AGENTS.md`).\n\nCLI flags take precedence over `ruler.toml`, which takes precedence over the default (disabled).\n\n### Validation\n\nSource files are validated at discovery time:\n\n- Files without YAML frontmatter are skipped with a warning.\n- Files missing required `name` or `description` are skipped with a warning.\n- Files where `name` does not match the filename stem are skipped with a warning.\n- Unknown frontmatter keys are dropped (not errored).\n\n### Dry-Run Mode\n\nUse `--dry-run` to preview which files would be written without touching disk.\n\n### `.gitignore` Integration\n\nWhen subagents are enabled, the four target directories are added to the Ruler-managed block of `.gitignore`:\n\n```\n.claude\u002Fagents\u002F\n.cursor\u002Fagents\u002F\n.codex\u002Fagents\u002F\n.github\u002Fagents\u002F\n```\n\nUse `--no-gitignore` to opt out.\n\n### Cleanup\n\nSubagent propagation does **not** currently have explicit `ruler revert` support. By default, `ruler apply` is non-destructive and leaves existing native subagent directories untouched when subagents are disabled or missing. To allow automatic cleanup of stale generated directories, set `[agents] cleanup_orphaned = true`, then disable subagents (`[agents] enabled = false` or `--no-subagents`) and run `ruler apply`.\n\n### Example Workflow\n\n```bash\n# 1. Author a subagent in your project\nmkdir -p .ruler\u002Fagents\ncat > .ruler\u002Fagents\u002Fcode-reviewer.md \u003C\u003C 'EOF'\n---\nname: code-reviewer\ndescription: Reviews changes against SOLID\u002FDRY\u002FKISS\ntools: [Read, Grep, Glob]\nreadonly: true\n---\n\nYou review code changes for quality.\nEOF\n\n# 2. Opt subagents in (default is disabled — see [agents] section above)\necho -e \"\\n[agents]\\nenabled = true\" >> .ruler\u002Fruler.toml\n\n# 3. Apply\nruler apply\n\n# 4. The subagent is now available in each agent's native location:\n#    - Claude Code:  .claude\u002Fagents\u002Fcode-reviewer.md\n#    - Cursor:       .cursor\u002Fagents\u002Fcode-reviewer.md\n#    - Codex CLI:    .codex\u002Fagents\u002Fcode-reviewer.toml\n#    - GitHub Copilot: .github\u002Fagents\u002Fcode-reviewer.md\n```\n\n### Limitations\n\n- **No explicit revert command.** Optional cleanup is available via `[agents] cleanup_orphaned = true` and a subsequent `apply`.\n- **Atomic replace, not merge.** Ruler regenerates each agent's subagent directory from the source on every apply. Manual edits to generated files will be overwritten.\n- **No support yet for agents without a native subagent primitive.** Windsurf, RooCode, Aider, Gemini CLI, and others are skipped with a warning. Propagation will be added when those agents ship a comparable file format.\n\n## `.gitignore` Integration\n\nRuler automatically manages your `.gitignore` file to keep generated agent configuration files out of version control.\n\n### How it Works\n\n- Creates or updates `.gitignore` in your project root\n- Adds paths to a managed block marked with `# START Ruler Generated Files` and `# END Ruler Generated Files`\n- Preserves existing content outside this block\n- Sorts paths alphabetically and uses relative POSIX-style paths\n\n### Example `.gitignore` Section (sample - actual list depends on enabled agents)\n\n```gitignore\n# Your existing rules\nnode_modules\u002F\n*.log\n\n# START Ruler Generated Files\n.aider.conf.yml\n.clinerules\nAGENTS.md\nCLAUDE.md\n# END Ruler Generated Files\n\ndist\u002F\n```\n\n### Control Options\n\n- **CLI flags**: `--gitignore`, `--no-gitignore`, `--gitignore-local`, `--no-gitignore-local`\n- **Configuration**: `[gitignore].enabled` and `[gitignore].local` in `ruler.toml`\n- **Default**: enabled\n\n## Practical Usage Scenarios\n\n### Scenario 1: Getting Started Quickly\n\n```bash\n# Initialize Ruler in your project\ncd your-project\nruler init\n\n# Edit the generated files\n# - Add your coding guidelines to .ruler\u002FAGENTS.md (or keep adding additional .md files)\n# - Customize .ruler\u002Fruler.toml if needed\n\n# Apply rules to all AI agents\nruler apply\n```\n\n### Scenario 2: Complex Projects with Nested Rules\n\nFor large projects with multiple components or services, enable nested rule loading so each directory keeps its own rules and MCP bundle:\n\n```bash\n# Set up nested .ruler directories\nmkdir -p src\u002F.ruler tests\u002F.ruler docs\u002F.ruler\n\n# Add component-specific instructions\necho \"# API Design Guidelines\" > src\u002F.ruler\u002Fapi_rules.md\necho \"# Testing Best Practices\" > tests\u002F.ruler\u002Ftest_rules.md\necho \"# Documentation Standards\" > docs\u002F.ruler\u002Fdocs_rules.md\n```\n\n```toml\n# .ruler\u002Fruler.toml\nnested = true\n```\n\n```bash\n# The CLI inherits nested mode from ruler.toml\nruler apply --verbose\n\n# Override from the CLI at any time\nruler apply --no-nested\n```\n\nThis creates context-specific instructions for different parts of your project while maintaining global rules in the root `.ruler\u002F` directory. Nested runs automatically keep every nested config enabled even if a child tries to disable it.\n\n> [!NOTE]\n> The CLI prints \"Nested mode is experimental and may change in future releases.\" the first time nested processing runs. Expect refinements in future versions.\n\n### Scenario 3: Team Standardization\n\n1. Create `.ruler\u002Fcoding_standards.md`, `.ruler\u002Fapi_usage.md`\n2. Commit the `.ruler` directory to your repository\n3. Team members pull changes and run `ruler apply` to update their local AI agent configurations\n\n### Scenario 4: Project-Specific Context for AI\n\n1. Detail your project's architecture in `.ruler\u002Fproject_overview.md`\n2. Describe primary data structures in `.ruler\u002Fdata_models.md`\n3. Run `ruler apply` to help AI tools provide more relevant suggestions\n\n### Integration with NPM Scripts\n\n```json\n{\n  \"scripts\": {\n    \"ruler:apply\": \"ruler apply\",\n    \"dev\": \"npm run ruler:apply && your_dev_command\",\n    \"precommit\": \"npm run ruler:apply\"\n  }\n}\n```\n\n### Integration with GitHub Actions\n\n```yaml\n# .github\u002Fworkflows\u002Fruler-check.yml\nname: Check Ruler Configuration\non:\n  pull_request:\n    paths: ['.ruler\u002F**']\n\njobs:\n  check-ruler:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions\u002Fcheckout@v4\n      - uses: actions\u002Fsetup-node@v4\n        with:\n          node-version: '20'\n          cache: 'npm'\n\n      - name: Install Ruler\n        run: npm install -g @intellectronica\u002Fruler\n\n      - name: Apply Ruler configuration\n        run: ruler apply --no-gitignore\n\n      - name: Check for uncommitted changes\n        run: |\n          if [[ -n $(git status --porcelain) ]]; then\n            echo \"::error::Ruler configuration is out of sync!\"\n            echo \"Please run 'ruler apply' locally and commit the changes.\"\n            exit 1\n          fi\n```\n\n## Troubleshooting\n\n### Common Issues\n\n**\"Cannot find module\" errors:**\n\n- Ensure Ruler is installed globally: `npm install -g @intellectronica\u002Fruler`\n- Or use `npx @intellectronica\u002Fruler`\n\n**Permission denied errors:**\n\n- On Unix systems, you may need `sudo` for global installation\n\n**Agent files not updating:**\n\n- Check if the agent is enabled in `ruler.toml`\n- Verify agent isn't excluded by `--agents` flag\n- Use `--verbose` to see detailed execution logs\n\n**Configuration validation errors:**\n\n- Ruler now validates `ruler.toml` format and will show specific error details\n- Check that all configuration values match the expected types and formats\n\n### Debug Mode\n\nUse `--verbose` flag to see detailed execution logs:\n\n```bash\nruler apply --verbose\n```\n\nThis shows:\n\n- Configuration loading details\n- Agent selection logic\n- File processing information\n- MCP configuration steps\n\n## FAQ\n\n**Q: Can I use different rules for different agents?**\nA: Currently, all agents receive the same concatenated rules. For agent-specific instructions, include sections in your rule files like \"## GitHub Copilot Specific\" or \"## Aider Configuration\".\n\n**Q: How do I set up different instructions for different parts of my project?**\nA: Enable nested mode either by setting `nested = true` in `ruler.toml` or by passing `ruler apply --nested`. The CLI inherits the config setting by default, but `--no-nested` always wins if you need to opt out for a run. Nested mode keeps loading rules (and MCP settings) from every `.ruler\u002F` directory in the hierarchy, forces child configs to remain nested, and logs \"Nested mode is experimental and may change in future releases.\" if any nested processing occurs.\n\n**Q: How do I temporarily disable Ruler for an agent?**\nA: Set `enabled = false` in `ruler.toml` under `[agents.agentname]`, or use `--agents` flag to specify only the agents you want.\n\n**Q: What happens to my existing agent configuration files?**\nA: Ruler creates backups with `.bak` extension before overwriting any existing files.\n\n**Q: Can I run Ruler in CI\u002FCD pipelines?**\nA: Yes! Use `ruler apply --no-gitignore` in CI to avoid modifying `.gitignore`. See the GitHub Actions example above.\n\n**Q: How do I migrate from older versions using `instructions.md`?**\nA: Simply rename `.ruler\u002Finstructions.md` to `.ruler\u002FAGENTS.md` (recommended). If you keep the legacy file and omit `AGENTS.md`, Ruler will still use it (without emitting the old deprecation warning). Having both causes `AGENTS.md` to take precedence; the legacy file is still concatenated afterward.\n\n**Q: How does OpenHands MCP propagation classify servers?**\nA: Local stdio servers become `stdio_servers`. Remote URLs containing `\u002Fsse` are classified as `sse_servers`; others become `shttp_servers`. Bearer tokens in an `Authorization` header are extracted into `api_key` where possible.\n\n**Q: Where is Zed configuration written now?**\nA: Ruler writes a `settings.json` in the project root (not the user home dir) and transforms MCP server definitions to Zed's `context_servers` format including `source: \"custom\"`.\n\n**Q: What changed about MCP initialization?**\nA: `ruler init` now only adds example MCP server sections to `ruler.toml` instead of creating `.ruler\u002Fmcp.json`. The JSON file is still consumed if present, but TOML servers win on name conflicts.\n\n**Q: Is Kiro supported?**\nA: Yes. Kiro receives concatenated rules at `.kiro\u002Fsteering\u002Fruler_kiro_instructions.md`.\n\n## Development\n\n### Setup\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fintellectronica\u002Fruler.git\ncd ruler\nnpm install\nnpm run build\n```\n\n### Testing\n\n```bash\n# Run all tests\nnpm test\n\n# Run tests with coverage\nnpm run test:coverage\n\n# Run tests in watch mode\nnpm run test:watch\n```\n\n### Code Quality\n\n```bash\n# Run linting\nnpm run lint\n\n# Run formatting\nnpm run format\n```\n\n## Contributing\n\nContributions are welcome! Please:\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Add tests for new functionality\n5. Ensure all tests pass\n6. Submit a pull request\n\nFor bugs and feature requests, please [open an issue](https:\u002F\u002Fgithub.com\u002Fintellectronica\u002Fruler\u002Fissues).\n\n## License\n\nMIT\n\n---\n\n© Eleanor Berger  \n[ai.intellectronica.net](https:\u002F\u002Fai.intellectronica.net\u002F)\n","Ruler 是一个用于统一管理多种 AI 编码助手指令的工具。其核心功能包括集中式的规则管理、嵌套规则加载以及自动分发这些规则到支持的 AI 代理配置文件中，从而解决因使用不同编码助手（如 GitHub Copilot、Claude 等）而产生的指导不一致、重复维护工作等问题。Ruler 适合于团队开发场景，特别是当项目结构复杂且需要为不同组件提供上下文特定指示时，能够显著提高工作效率和代码一致性。此外，它还提供了简单的命令行界面以方便用户操作，并能自动化处理 `.gitignore` 文件以保持生成的配置文件不出现在版本控制中。",2,"2026-06-11 03:47:28","high_star"]