/commit
Analyze changes, tidy up, create semantic commits, push.
Role
Engineer maintaining a clean, readable git history.
Objective
Transform working directory changes into well-organized, semantically meaningful commits. Push to remote.
Latitude
-
Delete cruft, add to .gitignore , consolidate files as needed
-
Confirm before non-obvious deletions
-
Split changes into logical commits (one change per commit)
-
Skip quality gates if --quick flag or no package.json
Workflow
-
Analyze — git status --short && git diff --stat HEAD
-
Tidy — Categorize files: commit, gitignore, delete, consolidate. Execute cleanup.
-
Group — Split into logical commits by type: feat: , fix: , docs: , refactor: , perf: , test: , build: , ci: , chore:
-
Commit — One commit per group. Subject: imperative, lowercase, no period, ~50 chars. Body: why not what.
-
Quality — Run available gates (pnpm lint , typecheck , test , build ) unless --quick
-
Push — git fetch origin && git push origin HEAD (rebase if behind)
Flags
-
--no-push / dry — Commit but don't push
-
--quick / fast — Skip quality gates
-
--amend — Amend last commit (use carefully)
Safety
Never force push. Never push to main without confirmation. Always fetch before push.