このページは英語でのみご覧いただけます。
AGENTS.md vs Pathrule: When Each One Makes Sense
AGENTS.md is a reviewable instruction file and can be nested by directory.
Pathrule adds a shared, typed knowledge layer across the coding agents your team uses.
結論
AGENTS.md is a Markdown instruction file at the repository root, optionally nested by directory, read by Copilot, Codex, Cursor, Aider, Gemini CLI, Windsurf and others, and for a small repo with a short instruction list it is the right answer. It carries the same scaling pattern as CLAUDE.md: every instruction in a file ships for every task under it, thinning out as the list grows.

この記事の内容
- It is supported by GitHub Copilot, OpenAI Codex, Cursor, Amp, Warp, Aider, Devin, Gemini CLI, Amazon Q, and Windsurf.
- AGENTS.md is great for small repos and small teams. It carries the same scaling pattern as CLAUDE.md once the instruction list grows.
- Pathrule delivers a focused slice of the team's memories, rules, and skills at hook time, before the first tool call, scoped to the path being worked on.
- For most teams the right answer is both: keep a short AGENTS.md for tool-level conventions and let Pathrule route the long-tail team knowledge per path.
比較
| Area | AGENTS.md | Pathrule |
|---|---|---|
| Where it lives | Nested instruction files in the repository | Local store or shared Cloud workspace, attached to paths |
| What it carries | Free-form Markdown instructions | Typed memories, rules, and skills with scope and priority |
| When the assistant reads it | Root and applicable nested files, subject to the client’s limits | At hook time, scoped to the working directory, focused per intent |
| Scaling pattern | Nested files and scoped instructions | Typed knowledge with task-scoped selection and versioned updates |
| Review trail | Git history of instruction files | Change log per node with actor, version chain, and conflict resolution |
| Tools that read it | GitHub Copilot, Codex, Cursor, Amp, Warp, Aider, Devin, Gemini CLI, Amazon Q, Windsurf | Claude Code, Codex, Cursor, Windsurf, Copilot and other MCP-capable clients |
What AGENTS.md already does
Codex discovers instructions along the directory path. A repository can have a root file and more specific files below it. That makes AGENTS.md useful for package conventions, build commands and review expectations without one file holding every scope.
Git provides a clear review trail. For a team whose guidance is small and stable, these files can be the right amount of infrastructure.
What a knowledge layer adds
Pathrule distinguishes memories, rules and skills and stores them at workspace paths with attributed versions. It selects the part a task needs and delivers it through the client’s supported hooks, instruction files and MCP.
That becomes useful when knowledge grows through agent work and repeated team corrections, or several agents need the same decisions. The difference is the maintenance and delivery model, not whether a directory can have its own instructions.
Local or shared knowledge
Local mode uses a store on your machine without an account. Cloud mode shares workspace knowledge according to current membership and permissions. Local instruction files are generated from that source inside managed regions, preserving your text outside them.
The local MCP server has repository-aware helpers; Remote MCP is a narrower Cloud knowledge surface with different schemas. Your coding agent remains responsible for coding work.
Use both when it helps
Keep stable repository instructions in AGENTS.md. Put growing decisions, path constraints and repeatable procedures in Pathrule when shared updates and cross-agent delivery help your team. Avoid duplicating contradictory instructions in both places.