PromucFlow_constructor/.cursor/index.mdc

97 lines
3.6 KiB
Plaintext
Raw Normal View History

refactor: restructure .cursor directory for improved organization and clarity (#40196) # refactor: restructure .cursor directory for improved organization and clarity ## Description This PR refactors the `.cursor` directory to enhance organization, clarity, and maintainability. ### Problem The existing `.cursor` directory lacked clear organization, making it difficult to find specific files, understand their purpose, and add new components consistently. ### Solution A comprehensive restructuring: #### New Directory Structure ``` .cursor/ ├── settings.json # Main configuration file ├── docs/ # Documentation │ ├── guides/ # In-depth guides │ ├── references/ # Quick references │ └── practices/ # Best practices ├── rules/ # Rule definitions │ ├── commit/ # Commit-related rules │ ├── quality/ # Code quality rules │ ├── testing/ # Testing rules │ └── verification/ # Verification rules └── hooks/ # Git hooks and scripts ``` #### Key Changes 1. **Logical Categorization**: Organized files into clear categories based on purpose 2. **Improved Documentation**: Added comprehensive README files for each directory 3. **Standardized Naming**: Implemented consistent kebab-case naming convention 4. **Reference Updates**: Updated all internal references to point to new file locations ### Benefits - **Easier Navigation**: Clear categorization makes finding files intuitive - **Improved Understanding**: Comprehensive documentation explains purpose and usage - **Simplified Maintenance**: Logical structure makes updates and additions easier - **Better Onboarding**: New team members can quickly understand the system This refactoring sets a solid foundation for all Cursor AI-related configurations and rules, making it easier for the team to leverage Cursor's capabilities.
2025-04-11 06:34:33 +00:00
---
description:
globs:
alwaysApply: true
---
# Appsmith Cursor Rules
```yaml
name: Appsmith Cursor Rules
description: A comprehensive set of rules for Cursor AI to enhance development for Appsmith
author: Cursor AI
version: 1.0.0
tags:
- appsmith
- development
- quality
- verification
activation:
always: true
event:
- pull_request
- file_change
- command
triggers:
- pull_request.created
- pull_request.updated
- file.created
- file.modified
- command: "cursor_help"
```
## Overview
This is the main entry point for Cursor AI rules for the Appsmith codebase. These rules help enforce consistent coding standards, verify bug fixes and features, generate appropriate tests, and optimize performance.
## Directory Structure
```
.cursor/
├── settings.json # Main configuration file
├── docs/ # Documentation
│ ├── guides/ # In-depth guides
│ ├── references/ # Quick references
│ └── practices/ # Best practices
├── rules/ # Rule definitions
│ ├── commit/ # Commit-related rules
│ ├── quality/ # Code quality rules
│ ├── testing/ # Testing rules
│ └── verification/ # Verification rules
└── hooks/ # Git hooks and scripts
```
## Available Rules
### 1. Commit Rules
- [Semantic PR Validator](rules/commit/semantic-pr-validator.mdc): Ensures pull request titles follow the Conventional Commits specification.
- [Semantic PR Guidelines](rules/commit/semantic-pr.md): Guidelines for writing semantic commit messages.
### 2. Quality Rules
- [Performance Optimizer](rules/quality/performance-optimizer.mdc): Identifies performance bottlenecks in code and suggests optimizations.
- [Pre-commit Quality Checks](rules/quality/pre-commit-checks.mdc): Quality checks that run before commits.
### 3. Testing Rules
- [Test Generator](rules/testing/test-generator.mdc): Analyzes code changes and generates appropriate test cases.
### 4. Verification Rules
- [Bug Fix Verifier](rules/verification/bug-fix-verifier.mdc): Guides developers through proper bug fixing steps.
- [Feature Verifier](rules/verification/feature-verifier.mdc): Verifies that new features are properly implemented and tested.
- [Feature Implementation Validator](rules/verification/feature-implementation-validator.mdc): Validates feature implementations.
- [Workflow Validator](rules/verification/workflow-validator.mdc): Validates development workflows.
## Documentation
- [Guides](docs/guides/): In-depth guides on specific topics
- [References](docs/references/): Quick reference documents
- [Practices](docs/practices/): Best practices for development
## Command Examples
- `validate_pr_title` - Check if a PR title follows conventional commits format
- `verify_bug_fix --pullRequest=123` - Verify a bug fix implementation
- `generate_tests --file=src/utils/helpers.js` - Generate tests for a specific file
- `optimize_performance --file=src/components/Table.tsx` - Analyze and optimize performance
- `validate_feature --pullRequest=123` - Validate a feature implementation
- `cursor_help` - Display available commands and provide guidance
## Configuration
The behavior of these rules can be customized in the `.cursor/settings.json` file.
## Activation
To activate all rules, run `cursor_help` in the command palette. This will display available commands and provide guidance on using the rules for your specific task.