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 -Aby reflex. - Note:
/arc:commitsatisfies 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
ghCLI 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), notbiome 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/popin hooks — lint-staged handles this safely. - NEVERDisable hooks permanently.
--no-verifyis 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 --unsafeon Edit/Write. - MUSTUse
biome check --fix(combined format + lint), not separatebiome format+biome lint.