Several AI coding tools now have their own way to store project rules -- .cursor/rules/, .windsurf/rules/, .github/instructions/, .clinerules/, .amazonq/rules/, and so on. The formats are close enough to feel familiar, but different enough to create annoying duplication: one tool calls it paths, another calls it globs, another calls it applyTo.
This repo proposes a shared file format so you can write your rules once in .agents/rules/ and have every tool read them.
- RFC.md -- The full proposal: motivation, format spec, directory layout, tool mappings
- examples/ -- Sample rule files showing different trigger modes
- schema/agent-rule.schema.json -- JSON Schema for frontmatter validation
- compatibility/mapping.md -- Field-by-field mapping notes for Cursor, Windsurf, Copilot, Cline, JetBrains, Amazon Q, and adjacent tools like Claude Code
- agentsmd/agents.md#179 -- The GitHub issue proposing this format on agents.md
- agent-rules-tool -- CLI for validating, linting, and working with agent rule files
Markdown with optional YAML frontmatter. A file with no frontmatter is valid (treated as always-on).
---
name: api-conventions
description: REST API design patterns for this codebase
trigger: auto
paths:
- "src/api/**/*.ts"
priority: 100
---
# API Conventions
When writing API endpoints...- AGENTS.md handles project instructions. This doesn't replace it.
- Agent Skills handles reusable capabilities. This doesn't replace that either.
- This handles the gap between them: structured rules scoped to specific files or directories.
Cursor already reads from .agents/skills/, so the .agents/ directory has real cross-tool precedent.