Skip to content

Commit a9d117e

Browse files
committed
Add Cursor rule to enforce reading copilot-instructions.md
Ensures Cursor AI reads the coding guidelines file before any coding task, since the @files directive doesn't reliably inject file content.
1 parent 9986f57 commit a9d117e

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
description: MANDATORY - Read .github/copilot-instructions.md before ANY coding task in this SQLiteCpp project.
3+
globs:
4+
alwaysApply: true
5+
---
6+
7+
# MANDATORY: Read Custom Instructions Before Coding
8+
9+
**CRITICAL REQUIREMENT**: Before performing ANY coding task (writing code, reviewing code, suggesting changes, answering code questions, or modifying files), you MUST first read the file `.github/copilot-instructions.md` using the Read tool.
10+
11+
This is NON-NEGOTIABLE. Do not skip this step. Do not assume you know the contents. Always read the file fresh.
12+
13+
## Why This Matters
14+
15+
The `copilot-instructions.md` file contains project-specific coding standards that MUST be followed:
16+
17+
- **RAII principles** - Acquire in constructors, release in destructors
18+
- **Exception rules** - NEVER throw in destructors, use `SQLITECPP_ASSERT()` instead
19+
- **C++ version constraints** - C++11 only in core library
20+
- **Naming conventions** - `m` prefix for members, `a` prefix for arguments, etc.
21+
- **Code style** - 4 spaces, Allman braces, 120 char max, `#pragma once`
22+
- **Documentation** - Doxygen with `@brief`, `@param`, `@return`, `@throw`
23+
- **Testing requirements** - Tests required for new functionality
24+
- **Build commands** - CMake and Meson instructions
25+
26+
## Required Action
27+
28+
```
29+
Read the file: .github/copilot-instructions.md
30+
```
31+
32+
Execute this read operation BEFORE responding to any coding request. This ensures you have the current, complete coding guidelines for this SQLiteCpp project.
33+
34+
If you cannot read the file for any reason, inform the user immediately.

0 commit comments

Comments
 (0)