Skip to content

Commit 7f7a75a

Browse files
committed
[CHORE] Introduce optimized Cursor rules for SubZilla.
1 parent 01ecece commit 7f7a75a

11 files changed

Lines changed: 275 additions & 1687 deletions

.cursor/README.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Cursor Rules Structure
2+
3+
This directory contains optimized rules for Cursor AI assistance in the SubZilla project.
4+
5+
## 📁 Rule Files
6+
7+
### `subzilla-essentials.mdc`
8+
9+
Main development rules covering:
10+
11+
- Core execution principles (SEARCH FIRST, REUSE PATTERNS)
12+
- Architecture patterns and monorepo structure
13+
- TypeScript conventions
14+
- Development workflow
15+
16+
### `ai-corrections.mdc`
17+
18+
Specific corrections for common AI mistakes:
19+
20+
- Prevents unnecessary file creation
21+
- Enforces emoji logging
22+
- Blocks skeleton code generation
23+
- Maintains existing patterns
24+
25+
### `quick-reference.mdc`
26+
27+
Copy-paste examples for:
28+
29+
- Service class patterns
30+
- CLI command structure
31+
- Import conventions
32+
- Error handling templates
33+
34+
## 🚀 Usage
35+
36+
These rules are automatically loaded by Cursor based on file globs:
37+
38+
- `subzilla-essentials.mdc`: Manual reference (not always applied)
39+
- `ai-corrections.mdc`: Always applied to prevent common mistakes
40+
- `quick-reference.mdc`: Manual reference for code examples
41+
42+
## 📝 Maintenance
43+
44+
- Keep rules focused on AI behavior, not documentation
45+
- Update `ai-corrections.mdc` when noticing repeated AI mistakes
46+
- Add new patterns to `quick-reference.mdc` as they emerge
47+
- Review quarterly and remove outdated rules
48+
49+
## 🔄 Migration
50+
51+
Old verbose rules are backed up in `.cursor/rules.backup/` if needed for reference.

.cursor/rules/ai-corrections.mdc

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
description: Specific corrections for common AI mistakes in SubZilla
3+
globs: ['**/*.ts']
4+
alwaysApply: true
5+
---
6+
7+
# AI Behavior Corrections
8+
9+
## ❌ Common AI Mistakes to Prevent
10+
11+
### 1. Creating Unnecessary Files
12+
13+
**WRONG:** Creating new utility files for simple functions
14+
**RIGHT:** Add to existing service classes or utils
15+
16+
### 2. Forgetting Emoji Logging
17+
18+
**WRONG:** `console.log('Processing file...')`
19+
**RIGHT:** `console.log('🔄 Processing file...')`
20+
21+
### 3. Skeleton Code
22+
23+
**WRONG:** `// TODO: Implement error handling`
24+
**RIGHT:** Complete implementation with try/catch and context
25+
26+
### 4. Over-Complex Solutions
27+
28+
**WRONG:** Creating abstract factories for 2 implementations
29+
**RIGHT:** Simple strategy pattern or conditional logic
30+
31+
### 5. Ignoring Existing Patterns
32+
33+
**WRONG:** New error handling approach
34+
**RIGHT:** Follow existing FormattingStripper/SubtitleProcessor patterns
35+
36+
## ✅ AI Should Always
37+
38+
- Search codebase before implementing
39+
- Extend existing classes/patterns
40+
- Use workspace imports for cross-package refs
41+
- Include comprehensive error handling
42+
- Test with `yarn start` before claiming completion

0 commit comments

Comments
 (0)