Skip to lesson
Exit
Cursor team workflows in a shared repo1 / 2

1 min lesson

Context strategy is an engineering problem

Work through this case: "A teammate says output is bad on the monorepo, so they keep pasting more and more code into the prompt. Diagnose and prescribe." Say what you would do and why.

Step 1 of 2

In a large repo, getting the right context into the agent is not a prompt-length contest. It's an information-retrieval design problem. Stuffing more text in feels productive and rarely is. The real skill is engineering what the model can find and reach.

Cursor gives you four distinct mechanisms that do different jobs. Confusing them is the most common reason teams get mediocre output on big codebases.

The four context mechanisms
Indexing + semantic search
How the agent discovers relevant code you didn't name. Broad recall across the repo.
@-mention exact files/symbols
How you give precision: pin the exact files, docs or symbols that matter. High signal, no guessing.
MCP connectors
How you pull in out-of-repo context: Jira tickets, Confluence pages, design docs, observability. The work item, not just the code.
.cursorignore / scoping
How you subtract context: keep vendored trees, generated artifacts and secret-bearing files out of indexing and out of the agent's default reading. A noise and exposure reducer, not a security boundary.