# 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.
82 lines
2.8 KiB
Markdown
82 lines
2.8 KiB
Markdown
# Semantic PR Guidelines for Appsmith
|
|
|
|
This guide outlines how to ensure your pull requests follow the Conventional Commits specification, which is enforced in this project using the [semantic-prs](https://github.com/Ezard/semantic-prs) GitHub app.
|
|
|
|
## Current Configuration
|
|
|
|
The project uses the following semantic PR configuration in `.github/semantic.yml`:
|
|
|
|
```yaml
|
|
# Always validate the PR title, and ignore the commits
|
|
titleOnly: true
|
|
```
|
|
|
|
This means that only the PR title needs to follow the Conventional Commits spec, and commit messages are not validated.
|
|
|
|
## Pull Request Title Format
|
|
|
|
PR titles should follow this format:
|
|
|
|
```
|
|
type(scope): description
|
|
```
|
|
|
|
### Types
|
|
|
|
Common types according to Conventional Commits:
|
|
|
|
- `feat`: A new feature
|
|
- `fix`: A bug fix
|
|
- `docs`: Documentation changes
|
|
- `style`: Changes that don't affect the code's meaning (formatting, etc.)
|
|
- `refactor`: Code changes that neither fix a bug nor add a feature
|
|
- `perf`: Performance improvements
|
|
- `test`: Adding or fixing tests
|
|
- `build`: Changes to build process, dependencies, etc.
|
|
- `ci`: Changes to CI configuration files and scripts
|
|
- `chore`: Other changes that don't modify source or test files
|
|
- `revert`: Reverts a previous commit
|
|
|
|
### Scope
|
|
|
|
The scope is optional and represents the section of the codebase affected by the change (e.g., `client`, `server`, `widgets`, `plugins`).
|
|
|
|
### Description
|
|
|
|
A brief description of the changes. Should:
|
|
- Use imperative, present tense (e.g., "add" not "added" or "adds")
|
|
- Not capitalize the first letter
|
|
- Not end with a period
|
|
|
|
## Examples of Valid PR Titles
|
|
|
|
- `feat(widgets): add new table widget capabilities`
|
|
- `fix(auth): resolve login redirect issue`
|
|
- `docs: update README with new setup instructions`
|
|
- `refactor(api): simplify error handling logic`
|
|
- `chore: update dependencies to latest versions`
|
|
|
|
## Examples of Invalid PR Titles
|
|
|
|
- `Added new feature` (missing type)
|
|
- `fix - login bug` (improper format, missing scope)
|
|
- `feat(client): Added new component.` (description should use imperative mood and not end with period)
|
|
|
|
## Automated Validation
|
|
|
|
The semantic-prs GitHub app will automatically check your PR title when you create or update a pull request. If your PR title doesn't follow the conventions, the check will fail, and you'll need to update your title.
|
|
|
|
## Cursor Assistance
|
|
|
|
Cursor will help enforce these rules by:
|
|
|
|
1. Suggesting conventional PR titles when creating branches
|
|
2. Validating PR titles against the conventional format
|
|
3. Providing feedback on non-compliant PR titles
|
|
4. Suggesting corrections for PR titles that don't meet the requirements
|
|
|
|
## Resources
|
|
|
|
- [Conventional Commits Specification](https://www.conventionalcommits.org/)
|
|
- [semantic-prs GitHub App](https://github.com/Ezard/semantic-prs)
|
|
- [Angular Commit Message Guidelines](https://github.com/angular/angular/blob/main/CONTRIBUTING.md#commit) |