A command-line tool that allows you to manage a single Source of Truth markdown file for your AI coding instructions and links/syncs it to all your AI coding agents (Claude Code, Roo Code, Windsurf, Cline, Copilot, Aider, Codex, ZCode, OpenCode, Pi Agent, etc.).
- Centralized Source of Truth: Define your persona, coding standards, preferred libraries, and workflow configurations in one place (defaults to
~/RULES.md). - Interactive Console UI: An easy-to-use checklist terminal interface to select which agents to target.
- Smart Merger: If you already have existing rule files for specific agents, you can append their contents to your Source of Truth or back them up.
- Robust Symlink/Hardlink Fallbacks:
- Symlinks on Windows require Developer Mode or Administrator privileges.
- If a symlink fails, Agent Rules automatically falls back to a Hard Link (
fs.linkSync), which behaves identically to a symlink for file edits but requires no special privileges! - If both fail, it falls back to a copy.
- Special Aider Support: Automatically appends the Conventions file to your global
~/.aider.conf.ymllist so Aider loads it automatically.
The easiest way to run the tool is directly via npx without any installation:
npx rules-mdNavigate to this directory and run:
node index.jsTo make the rules-md command available anywhere on your system:
npm link
# or
npm install -g .Then simply run:
rules-md| Agent | Global Instructions Path | Notes |
|---|---|---|
| Antigravity | ~/.gemini/GEMINI.md |
Google Antigravity global agent rules file. |
| Claude Code | ~/.claude/CLAUDE.md |
Automatically loaded at startup. |
| Roo Code / Roo Cline | ~/.roo/rules/global_rules.md |
Reads all markdown files in rules folder. |
| Windsurf (Cascade) | ~/.codeium/windsurf/memories/global_rules.md |
Central memories configuration. |
| Cline (Documents) | ~/Documents/Cline/Rules/global_rules.md |
Cline's central rules directory. |
| Cline / Common | ~/.agents/AGENTS.md |
Shared standard agent instructions path. |
| GitHub Copilot (JetBrains) | %LOCALAPPDATA%/github-copilot/intellij/global-copilot-instructions.md |
Local appdata path. |
| GitHub Copilot (CLI) | ~/.copilot/copilot-instructions.md |
Default CLI config. |
| Aider | ~/.aider.conventions.md |
Handled via ~/.aider.conf.yml read block. |
| Z.ai ZCode | ~/.zcode/AGENTS.md |
Central ZCode instructions path. |
| OpenCode | ~/.config/opencode/AGENTS.md |
Standard OpenCode path. |
| Pi Agent | ~/.pi/agent/AGENTS.md |
Pi Agent instructions path. |
| OpenAI Codex | ~/.codex/AGENTS.md |
OpenAI Codex agent global rules file. |
| Kimi Code CLI | ~/.kimi-code/AGENTS.md |
Kimi Code CLI global instructions. |
| Mistral Vibe CLI | ~/.vibe/AGENTS.md |
Mistral Vibe CLI global rules. |
For tools that store rules in Settings UI or databases instead of the filesystem:
- Cursor: Open Cursor Settings > General > Rules for AI and copy-paste your rules there.
- VS Code Copilot: Add your source rules folder path to the
chat.instructionsFilesLocationssetting in VS Code.