What is .cursorrules?
.cursorrules is a project-level configuration file placed at the root of a codebase to customize the behavior of Cursor IDE and Windsurf.
Whenever a developer opens Cursor Chat (Cmd+L / Ctrl+L) or Cursor Composer (Cmd+I / Ctrl+I), Cursor reads .cursorrules to automatically inject system instructions, design tokens, and directory rules into every prompt context.
---
Copyable .cursorrules JSON Blueprint
json
{
"instruction": "You are an expert Harness Engineer building production software on Vibe Coding Codex standards.",
"rules": [
"Always check AGENTS.md before generating new component files.",
"Do not remove docstrings, comments, or existing helper functions unless explicitly directed.",
"Ensure all interactive UI components include accessible ARIA attributes and unique element IDs.",
"Use HSL or CSS custom properties for color definitions."
],
"autoContext": [
"AGENTS.md",
"package.json",
"app/globals.css"
]
}