Context File
Also known as: CLAUDE.md, AGENTS.md, .cursorrules, Project Context, AI Configuration File
Definition
A file placed in a project repository that provides persistent context, instructions, and constraints to AI coding assistants. Context files are automatically loaded when an AI assistant works on the project, giving it project-specific knowledge without requiring the user to repeat instructions in every session. Common examples include CLAUDE.md, AGENTS.md, and .cursorrules.
What this is NOT
- Not a system prompt (context files are per-project, not per-session)
- Not documentation for humans (though humans can read them)
- Not configuration files (context files contain natural language, not settings)
- Not version-controlled prompts (context files evolve with the project)
Alternative Interpretations
Different communities use this term differently:
claude-code
A CLAUDE.md file in the project root that contains project-specific instructions, coding standards, architectural decisions, and session notes that Claude Code loads automatically.
Sources: Claude Code documentation, Anthropic best practices
cursor
A .cursorrules file that defines project-specific rules, patterns, and preferences for Cursor's AI features to follow.
Sources: Cursor documentation
general-ai-dev
Any structured file (often markdown) that provides AI assistants with project context, including README files when used for this purpose.
Sources: Community best practices
Examples
- A CLAUDE.md file explaining the project's architecture and coding conventions
- A .cursorrules file specifying TypeScript patterns and forbidden practices
- An AGENTS.md file with session notes and decision log for AI continuity
- A context file listing tech stack, dependencies, and deployment process
Counterexamples
Things that might seem like Context File but are not:
- A README.md written for human developers (unless also designed for AI)
- A system prompt in the AI application itself (not project-specific)
- An .env file (configuration, not context)
- A prompt template for a specific task (context files are persistent)
Relations
- specializes prompt (Context files are a specialized form of persistent prompting)
- overlapsWith system-prompt (Both provide instructions, but context files are project-scoped)
- usedBy code-executing-agent (Coding agents load context files for project understanding)
- requires context-engineering (Good context files require thoughtful context engineering)
Implementations
Tools and frameworks that implement this concept:
- Claude Code primary
- Claude Cowork secondary
- Oh-My-OpenCode secondary