Git Workflow
Rule
Commits
- NEVER: Auto-commit changes; allow review first.
- MUST: Stage and review changes before committing.
- SHOULD: Use conventional commit messages when practical.
- SHOULD: Use
ghCLI for GitHub operations (PRs, issues, etc.).
Pre-commit Hooks
- MUST: Use Husky + lint-staged for pre-commit checks.
- MUST: lint-staged runs format only (
biome format --write), notbiome check. Lint and typecheck run separately on the full project. - SHOULD: Run typecheck (
tsc --noEmit) on commit for small projects, pre-push for large ones (>200 files). - NEVER: Write manual
git stash push/popin hooks — lint-staged handles this safely. - NEVER: Disable hooks permanently; use
--no-verifysparingly for WIP commits.
Claude Code Hooks
- SHOULD: Configure PostToolUse hooks to run
biome check --fix --unsafeon Edit/Write. - MUST: Use
biome check --fix(combined format + lint), not separatebiome format+biome lint.