---
title: "Context Files"
description: "AGENTS.md as the baseline, plus optional tool-specific overlays that define agent boundaries and conventions"
url: "https://agentsurface.dev/docs/context-files"
lastVerified: 2026-09-25
lastModified: 2026-09-25T09:21:34.000Z
---



## Summary [#summary]

Context Files are repository and editor instructions for coding agents working inside a codebase. Use them to document commands, boundaries, architecture cues, package scopes, and tool-specific overlays.

* **Owns:** `AGENTS.md`, `CLAUDE.md`, Cursor rules, Copilot instructions, nested monorepo context, and drift detection.
* **Does not own:** public web discovery files like `llms.txt`, `robots.txt`, or JSON-LD; see [Discovery](/docs/discovery).
* **Agent-ready means:** agents can start safely, run the right commands, follow local conventions, and know when to ask before risky work.

## Start Here [#start-here]

* [AGENTS.md](/docs/context-files/agents-md) - Create the cross-tool baseline. Most repos need nothing else.
* [CLAUDE.md](/docs/context-files/claude-md) - Optional overlay, only when Claude Code needs instructions no other tool should see.
* [Cursor and Copilot](/docs/context-files/cursor-and-copilot) - Scope editor-specific rules without duplicating the baseline.
* [Monorepos](/docs/context-files/monorepos) - Use nested files where package ownership differs.
* [Drift Detection](/docs/context-files/drift-detection) - Keep commands and paths current.
* [Anti-Patterns](/docs/context-files/anti-patterns) - Avoid generated sludge, stale commands, and context sprawl.

## Related [#related]

* [Discovery](/docs/discovery) - Public agent-readable web files and crawl policy.
* [CLI Design](/docs/cli-design) - Command behavior that context files should reference.
* [Scoring Framework](/docs/scoring) - How context files are evaluated in audits.
* [Testing](/docs/testing) - Verify documented commands and workflows stay true.
