PromucFlow_constructor/.cursor/hooks/README.md
vivek-appsmith d176e40726
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 12:04:33 +05:30

43 lines
1.4 KiB
Markdown

# Appsmith Cursor Hooks
This directory contains hooks and scripts that automate tasks and enforce standards in the Appsmith development workflow.
## Available Hooks
### scripts/update-docs.sh
Automatically updates documentation based on code changes, ensuring that the documentation stays in sync with the codebase.
## How Hooks Work
Hooks are triggered by specific events in the development workflow, such as:
- Creating a pull request
- Pushing code to a branch
- Running specific commands
Each hook performs specific actions to maintain code quality, enforce standards, or automate routine tasks.
## Installing Hooks
To install these hooks in your local development environment:
1. Navigate to the root of the project
2. Run the following command:
```bash
cp .cursor/hooks/scripts/* .git/hooks/
chmod +x .git/hooks/*
```
This will copy the hooks to your local Git hooks directory and make them executable.
## Manual Execution
You can also run these hooks manually as needed:
```bash
# Update documentation based on code changes
.cursor/hooks/scripts/update-docs.sh
```
## Customizing Hooks
If you need to customize a hook for your specific development environment, copy it to your local `.git/hooks` directory and modify it as needed. Avoid changing the hooks in this directory directly, as they will be overwritten when you pull changes from the repository.