--- name: git-workflow description: Rules for generating Git commit messages and managing branch workflows. globs: ["COMMIT_EDITMSG", ".git/*"] --- # Git Workflow Constraints When generating commit messages, reviewing code for a commit, or planning a branch workflow, strictly follow these standards: 1. **Commit Formatting** - **Conventional Commits**: You MUST format all commit messages using conventional prefixes: `feat:`, `fix:`, `docs:`, `refactor:`, `ci:`, `meta:`. - **Clarity**: Ensure the message clearly explains *what* changed and *why*. 2. **Atomic Commits** - Group changes by a single logical concern. - NEVER mix documentation updates, core infrastructure code, and style guide changes in the same commit. - Ensure that the generated commit is easily revertible without breaking unrelated features. 3. **Branching Workflow** - Always assume changes will be pushed to a feature branch to create a Pull Request. - Do not suggest or generate commands that push directly to the main branch.