This guide explains how to pair Cursor AI with three structured prompt templates—core.md, request.md, and refresh.md—so the agent behaves like a safety‑first senior engineer who always studies the system before touching a line of code.
Defines Cursor’s always‑on operating principles: familiarise first, research deeply, act autonomously, verify relentlessly.
| Scope | Steps |
|---|---|
| Project‑specific | 1. Create a file named .cursorrules in your repo root. 2. Copy the entirety of core.md into it. |
| Global (all projects) | 1. Open Cursor Command Palette ⇧⌘P / ⇧CtrlP.2. Choose Cursor Settings → Configure User Rules. 3. Paste the full core.md text and save. |
The rules take effect immediately—no reload needed.
Use when you want Cursor to add functionality, refactor code, or apply targeted changes.
{Concise feature or change request}
---
[contents of request.md]
Workflow inside the template
- Familiarisation & Mapping (READ‑ONLY) – Agent inventories files, dependencies, configs, and established conventions before planning.
- Planning & Clarification – Sets success criteria, lists risks, resolves low‑risk ambiguities autonomously.
- Context Gathering – Locates all relevant artefacts with token‑aware filtering.
- Strategy & Core‑First Design – Chooses the safest, DRY‑compliant path.
- Execution – Makes incremental, non‑interactive changes.
- Validation – Runs tests/linters until green; auto‑fixes when safe.
- Report & Live TODO – Summarises changes, decisions, risks, and next steps.
Use when a previous fix didn’t stick or a bug keeps resurfacing.
{Short description of the persistent issue}
---
[contents of refresh.md]
Diagnostic loop inside the template
- Familiarisation & Mapping (READ‑ONLY) – Inventories current state to avoid false assumptions.
- Planning & Clarification – Restates the problem, success criteria, and constraints.
- Hypothesis Generation – Lists plausible root causes, ranked by impact × likelihood.
- Targeted Investigation – Gathers evidence, eliminates hypotheses.
- Root‑Cause Confirmation & Fix – Applies a core‑level, reversible fix.
- Validation – Re‑runs suites; ensures issue is truly resolved.
- Report & Live TODO – Documents root cause, fix, verification, and follow‑ups.
- Be specific. Start each template with a single clear sentence describing the goal or issue.
- One template at a time. Don’t mix
request.mdandrefresh.mdin the same prompt. - Trust the autonomy. The agent will self‑investigate, implement, and verify; intervene only if it raises a 🚧 blocker.
- Review summaries. After each run, skim the agent’s ✅/
⚠️ /🚧 report and TODO list. - Version control. Commit templates and
.cursorrulesso teammates inherit the workflow.
| Task | What to paste in Cursor |
|---|---|
| Set up rules | .cursorrules ← contents of core.md |
| Add / change feature | request.md template with first line replaced by feature request |
| Fix stubborn bug | refresh.md template with first line replaced by bug description |
With these templates in place, Cursor behaves like a disciplined senior engineer: study first, act second, verify always—delivering reliable, autonomous in‑repo help with minimal back‑and‑forth.