Toolkit
Project Instructions · Mental Model
On this page3 sections
Mental Model
Project instructions are a context-routing system. Their job is to deliver the smallest relevant repository contract before the makes a consequential decision.
Four Properties
- Scope — which repository, directory, file pattern, agent, or product surface receives the instruction.
- Precedence — how organization, user, repository, and nested files combine when they disagree.
- Persistence — when instructions load, reload, or survive context compaction.
- Authority — whether the text advises the model or is backed by an independently enforced control.
The first three determine whether the agent sees the right context. The fourth determines whether noncompliance is merely unlikely or technically prevented.
Product Realizations
| Product | Native center | Material distinction |
|---|---|---|
| Claude Code | CLAUDE.md plus scoped rules | Instructions and auto memory are related but separately authored context |
| OpenAI Codex | Hierarchical AGENTS.md | More specific directory scope refines the repository contract |
| GitHub Copilot | Repository, path-specific, and agent instruction files | Supported formats vary across CLI, IDE, review, and cloud surfaces |
Do not infer a universal precedence algorithm from the shared use of Markdown. Each product decides discovery and merge behavior.
The Crux
If a rule must hold even when the model misunderstands, ignores, or never loads it, the rule does not belong only in an instruction file. Put the explanation in instructions and the enforcement in permissions, hooks, tests, CI, or release policy.
Source register
Project Instructions sources
Primary vendor documentation reviewed on the date shown. Links may change after publication.
- How Claude remembers your project (opens in a new tab)
Anthropic · official docs · accessed 2026-08-01
- Custom instructions with AGENTS.md (opens in a new tab)
OpenAI · official docs · accessed 2026-08-01
- Adding custom instructions for GitHub Copilot CLI (opens in a new tab)
GitHub · official docs · accessed 2026-08-01
- Custom instructions support for GitHub Copilot (opens in a new tab)
GitHub · official docs · accessed 2026-08-01