Glossary definitionBrowse the neighboring terms

Context / Industry term

Context file

A persistent file checked into a project that tells an AI agent what it needs to know before starting work: conventions, constraints, tool instructions, and prior decisions.

When you start a new conversation with an AI coding agent, the model knows nothing about your project's history, conventions, or quirks. A context file solves this by living in the repo alongside the code. The agent reads it at the start of every session, so accumulated knowledge carries forward without anyone repeating themselves. Claude Code reads CLAUDE.md, Cursor reads .cursorrules, and the pattern is spreading across tools. A well-maintained context file turns a generic model into a teammate that remembers how you work.

Builder example

The difference between a helpful agent and an annoying one is often a single file. Without a context file, every session starts from scratch: the agent suggests patterns you rejected last week, ignores house style, and re-discovers constraints you already settled. A good context file encodes those decisions once and compounds their value across every future session.

Common confusion: A context file is not a system prompt pasted into a chat window. It lives in the repository, is version-controlled with the code, and evolves as the project evolves. It also differs from documentation written for humans: the audience is the model, so structure, specificity, and machine-readable formatting matter more than narrative flow.