Git Workflow

Rule

Commits

  • MUSTReview changes before committing. A commit is a claim about what changed, so read the diff first.
  • MUSTStage deliberately — group related changes, don't git add -A by reflex.
  • Note: /arc:commit satisfies the review requirement — reading and grouping the diff is its first step. This rule targets committing without looking, not automation as such.
  • SHOULDUse conventional commit messages when practical.
  • SHOULDUse gh CLI for GitHub operations (PRs, issues, etc.).

Pre-commit Hooks

  • MUSTUse Husky + lint-staged for pre-commit checks.
  • MUSTlint-staged runs format only (biome format --write), not biome check. Lint and typecheck run separately on the full project.
  • SHOULDRun typecheck (tsc --noEmit) on commit for small projects, pre-push for large ones (>200 files).
  • NEVERWrite manual git stash push/pop in hooks — lint-staged handles this safely.
  • NEVERDisable hooks permanently. --no-verify is for a local WIP commit you will amend before pushing — never for landing work, where it hides the defect the hook found.

Claude Code Hooks

  • SHOULDConfigure PostToolUse hooks to run biome check --fix --unsafe on Edit/Write.
  • MUSTUse biome check --fix (combined format + lint), not separate biome format + biome lint.