Ship Changes
Pre-loaded context
- Status:!
git status - Diff:!
git diff HEAD - Log:!
git log --oneline -10
Workflow
- Review all changes from status and diff
- Analyze recent commit style from log
- Check for quality check commands:
- If package.json exists, check for lint and test scripts - Run available checks in parallel: npm run lint, npm test - If no package.json, skip quality checks
- If checks fail: report errors, STOP — do not commit or push
- Group changed files by logical concern using atomic-commits grouping rules
- For each group: stage specific files by name, commit with HEREDOC format
- If all changes form one logical unit, stage files by name (never
git add -Aorgit add.) - Push:
git push(current branch) - Run
git statusafter to verify
Rules
- Stage files by name, never
git add -Aorgit add. - Group changes into atomic commits when they serve distinct purposes
- Generate message from changed files, match repo style
- Only run package manager commands if package.json exists with those scripts
- NEVER push if lint or tests fail
- NEVER force push (
-for--force) - NEVER skip hooks
- NEVER commit secrets
- Push to current branch only
Error Handling
- If lint or tests fail → report all errors, stop; do not commit or push
- If
git pushis rejected (non-fast-forward) → rungit pull --rebasethen retry push once - If pre-commit hook fails → fix reported issues, re-stage, create a NEW commit (never
--amend)