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

2 min lesson

The recall-vs-precision pattern

Say what this means in practice: "Use search/indexing for recall when you don't yet know where the relevant code lives."

Step 1 of 2

The recall-vs-precision pattern

Use search/indexing for recall when you don't yet know where the relevant code lives. Use @-mentions for precision once you do. Search surfaces the candidates, the @-mention pins them, and the agent works from ground truth instead of a fuzzy memory.

One run of the funnel, out loud

"The ticket says our webhook retries hammer the provider after a 500. I don't know where retry lives in this monorepo, so I start with recall - where do we handle provider webhook retries? Semantic search comes back with two candidates: services/payments/webhook-handler.ts and packages/http/retry-policy.ts."

"Now precision. I @-mention those two files so the agent reads them instead of recalling something plausible, and I pull the ticket in through the Jira MCPModel Context Protocol. A standard that lets an AI agent pull in context from outside the repo, like Jira tickets or internal docs. Press Enter for the full definition. connector so it has the actual acceptance criteria - cap at five attempts, jittered backoff, give up after ten minutes - rather than my paraphrase of them."

"What never enters the picture is services/payments/.env.staging, which .cursorignore keeps out of the index. So the agent is reasoning over two files and one ticket, not a monorepo. The plan came back scoped to retry-policy.ts and I approved it in a sentence."

MCPModel Context Protocol. A standard that lets an AI agent pull in context from outside the repo, like Jira tickets or internal docs. Press Enter for the full definition. brings the intent (the Jira ticket, the acceptance criteria) alongside the code, so the agent solves the actual business problem rather than its guess of it.

The reframe

"My prompt is too long" is almost never the real problem.

The real problem is usually retrieval: the agent indexed the wrong things, you never pinned the exact files or the ticket's intent never made it into context. Fix retrieval, not verbosity.