Raw view: Cursor Rule: Commit and PR Hygiene

No invisible, zero-width, or bidi-control characters detected.

---
description: Commit, branch, and pull request conventions
alwaysApply: true
---

# Commit and PR hygiene

These rules apply to every task that ends in a commit or a pull request.

## Before committing

- Run `{{CHECK_COMMAND}}` and fix everything it reports. Do not commit with failing tests, lint errors, or type errors.
- Run `git status` and `git diff --staged` and read the diff. Stage only files that belong to this change; never `git add -A` or `git add .` without reviewing the list.
- Remove debugging artifacts: `console.log`, `print`, `debugger`, `TODO(me)`, commented-out code, stray files.
- Never commit secrets, `.env*` files, credentials, or large binaries. If a lockfile changed and you did not intend to change dependencies, revert it.

## Commit scope

- One logical change per commit. A refactor and a behavior change are two commits. A formatting-only change is its own commit.
- A commit must leave the tree building and tests passing on its own; do not split a change so that an intermediate commit is broken.
- Do not amend, squash, rebase, or reset commits that already exist on the branch unless the user asks for it in this conversation.

## Commit message

Format (Conventional Commits):