Cursor's AI capabilities are highly configurable through rules files, context providers, and memory patterns. Master .cursorrules, the .cursor/rules/ directory, rule attachment modes, memory bank patterns, and @Docs for maximally effective AI-assisted coding.
0 / 5 completed
1 / 5
A developer creates a .cursorrules file in their project root. What is the primary purpose of this file?
The .cursorrules file contains natural language instructions that Cursor prepends to AI prompts throughout the project. Developers use it to enforce coding standards, architectural decisions, preferred libraries, and style guides — ensuring AI suggestions align with project conventions without manual context-setting each time.
2 / 5
Cursor's newer .cursor/rules/ directory approach replaces .cursorrules. What advantage do rule files in this directory offer?
The .cursor/rules/ directory allows multiple rule files with different scope and attachment modes: always (every prompt), auto (agent decides when relevant), agent-requested (available on demand), or manual (explicitly @-referenced). This granularity is impossible with a single .cursorrules file.
3 / 5
The memory bank pattern in Cursor involves maintaining structured Markdown files like projectbrief.md and activeContext.md. Why is this pattern used?
The memory bank pattern compensates for AI models' lack of persistent memory. Developers maintain structured Markdown files capturing project goals, architecture, progress, and decisions. Cursor rules instruct the AI to read these files at the start of sessions and update them when changes occur — simulating long-term project memory.
4 / 5
A Cursor rule file has globs: ["**/*.test.ts"] configured. When does this rule activate?
Rules with globs patterns activate automatically when the files included in the AI context match the specified glob. For example, **/*.test.ts activates a testing-specific rule whenever a test file is open or referenced — injecting test-specific instructions (preferred test patterns, mocking conventions) without manual intervention.
5 / 5
A developer adds @Docs to a Cursor Chat prompt. What does this context provider reference?
@Docs in Cursor references external documentation sources that have been crawled and indexed by Cursor (e.g., library official docs, MDN, framework references). Developers can add URLs to index, and @Docs lets the AI retrieve and cite content from those sources — grounding answers in official documentation rather than training data alone.