What is repository context?

Definition

Repository context includes more than the file currently being edited. It covers architecture, module boundaries, dependencies, configuration, tests, ownership, contribution rules, commit history, open work, and reasons behind earlier design choices.

Coding agents need relevant repository context to avoid locally plausible changes that conflict with wider behavior or future plans. Context should be retrieved for the specific task and linked to authoritative files or records so assumptions can be checked before code is changed.

Acronyms and aliases

codebase context synonym

Frequently asked questions

Why do coding agents need repository context?

Without it, an agent may produce code that looks correct in one file but violates architecture, conventions, dependencies, tests, or prior decisions.

What sources provide repository context?

Sources include code, tests, configuration, instructions, commit and pull-request history, issue discussions, architecture records, and ownership information.

Videos explaining repository context