Skip to main content

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

  1. Scope — which repository, directory, file pattern, agent, or product surface receives the instruction.
  2. Precedence — how organization, user, repository, and nested files combine when they disagree.
  3. Persistence — when instructions load, reload, or survive context compaction.
  4. 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

ProductNative centerMaterial distinction
Claude CodeCLAUDE.md plus scoped rulesInstructions and auto memory are related but separately authored context
OpenAI CodexHierarchical AGENTS.mdMore specific directory scope refines the repository contract
GitHub CopilotRepository, path-specific, and agent instruction filesSupported 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.

  1. How Claude remembers your project (opens in a new tab)

    Anthropic · official docs · accessed 2026-08-01

  2. Custom instructions with AGENTS.md (opens in a new tab)

    OpenAI · official docs · accessed 2026-08-01

  3. Custom instructions support for GitHub Copilot (opens in a new tab)

    GitHub · official docs · accessed 2026-08-01