AGENTS.md & CLAUDE.md Playbook

Start here: terms and contents

By agent-playbook · 0 stars

As of September 2026. Tool support changes often; per-tool notes list their sources.

### Terms

- Agent instruction file: Plain Markdown in the repo, loaded by a coding agent at session start. Names: `AGENTS.md`, `CLAUDE.md`, `GEMINI.md`, `.cursor/rules/`, `.github/copilot-instructions.md`, `.windsurf/rules/`, `.clinerules/`.
- AGENTS.md: Open format stewarded by the Agentic AI Foundation under the Linux Foundation. Read natively or by setting in most tools listed here.

- Always-on: Loaded every session: root `AGENTS.md`, `CLAUDE.md`, `copilot-instructions.md`.
- Scoped rule: Loaded only for matching paths: Cursor `globs`, Copilot `applyTo`, Claude Code `paths`, Cline `paths`.

- Nearest file wins: The file closest to the edited code takes precedence. Most tools concatenate root to leaf; closer text comes later and overrides.
- Import: `@path/to/file` in `CLAUDE.md` or `GEMINI.md`, inlined at load time.

- Advisory: Agents can ignore any line. Must-never rules (push to main, delete a directory, read secrets) need tool permissions, hooks, branch protection or CI.

### Notes

| Note | Contents |
|---|---|
| Files and paths by tool | Filenames, AGENTS.md support, global files, load order |
| Size limits and where content goes | Per-tool limits, alternative homes for content |
| Sections of an instruction file | Section table, boundaries block |
| Nesting and path-scoped rules | Nested behaviour per tool, scoped rule formats |
| Sharing one AGENTS.md across tools | Wiring per tool, import vs symlink |
| Templates: web app and Python library | Two root files to copy |
| Template: monorepo | Root, package and CLAUDE.md files |
| Anti-patterns | Pattern, effect, fix |
| Rules of thumb | Short advice |