ifixkart-admin/workflows/sharable/standard/commit.md
Adithiyan bbd3a3e959 feat: initial commit — full platform snapshot
- Backend: FastAPI app with all models, services, schemas, routes
- Admin Panel: Next.js dashboard with all modules
  (CRM, POS, repairs, warranties, billing, notifications, etc.)
- Ecommerce: storefront (submodule) + product catalog
- AI Agents: .agents/ skill library for Antigravity IDE
- Docs: architecture, billing, notification gateway markdown
- Submodules: Backend/OpenWA, Ecommerce/File 2/storefront
2026-10-13 12:59:47 +05:30

90 lines
3.7 KiB
Markdown

---
description: Generates commit messages or PR descriptions for the current git staged changes
auto_execution_mode: 2
---
## Generate Git Commit Message or PR Description
This workflow analyzes staged changes and generates either:
- A commit message following the ReloPortal commit format (if user sends `/commit`)
- A PR title and description (if user sends `/commit PR`)
### Commit Message Format
```
type(scope): short description
Detailed description of changes made.
Types: feat | fix | refactor | style | docs | test | chore
Scope: component name, page name, or feature area
```
### PR Format
```
Title: type(scope): short description
Description: Detailed description of changes made.
```
### Steps
1. **Check staged changes**
Run `git diff --cached --name-only` to see which files are staged.
2. **Analyze the changes**
- Read the diff using `git diff --cached` to understand what changed
- Identify the primary scope (component, page, or feature) based on file paths
- Determine the commit type based on the nature of changes:
- `feat`: New feature or functionality
- `fix`: Bug fix
- `refactor`: Code restructuring without behavior change
- `style`: Styling changes (CSS, SCSS, UI improvements)
- `docs`: Documentation changes
- `test`: Test additions or modifications
- `chore`: Maintenance tasks, dependencies, configuration
3. **Generate output based on user request**
- If user sends `/commit`: Generate commit message with type(scope): title and body
- If user sends `/commit PR`: Generate PR title and description
- Keep the title description concise (50 chars or less preferred)
- Use imperative mood ("add" not "added", "fix" not "fixed")
- Scope examples:
- `HomeSaleService` for home sale service changes
- `BMATab` for BMA tab component
- `PayrollConfiguration` for payroll config page
- `common` for utility classes or global styles
- Add a body/description paragraph explaining the high-level changes made
- Body should explain what was changed and why, not list files
- Keep body to 2-3 sentences for medium changes, 4-5 for larger changes
4. **Output only (READ-ONLY OPERATION)**
- Display the generated commit message or PR title/description to the user in chat
- **NEVER automatically run `git commit`, `git add`, or any git commands**
- **NEVER create a PR or make any API calls**
- This workflow is strictly for generating message text only
- User must manually copy the message and run `git commit -m "message"` themselves
- User must manually create the PR using the generated title/description
### Examples
**Commit Message Examples:**
- `feat(PayrollConfiguration): extract inline styles to SCSS`
Moved static inline styles to component SCSS file with BEM naming convention. Used color variables from colors.scss instead of hex codes for better maintainability.
- `fix(HomeSaleService): resolve VDI supplier ID desync`
Fixed supplier ID normalization in VDI tab payload builder to consistently set both insuranceCompanyName and insuranceCompanyId. This ensures the backend receives the correct supplier ID for API calls.
**PR Examples:**
**Title:** `feat(TravelBookingDetails): auto-calculate hotel nights from check-in/check-out dates`
**Description:**
Added auto-calculation of hotel nights based on check-in and check-out dates in the travel booking form. Implemented a new `calculateDaysBetweenDates` utility in src/utils/date.ts and integrated it with Form.useWatch to reactively calculate nights for each traveler. The numberOfNights field is now hidden and auto-populated, with a read-only display shown to users using CustomTypography with utility classes for consistent styling.