Create a single commit using Conventional Commits format, matching the style in git log.
Workflow
- Run these in parallel:
git status(see what's untracked / modified)git diffandgit diff --staged(see what will be committed)git log --oneline -10(match recent style)
- Review the changes and group them into ONE commit. If the diff spans clearly unrelated changes, ask the user whether to split.
- Stage explicitly (avoid
git add -A/git add .):
- Add the specific files that belong in this commit by name.
- Never stage
.env, credentials, or other secrets. Ifgitleakswould flag it, don't stage it.
- Compose the commit message:
- Subject:
<type>: <short imperative summary>— lowercase, no trailing period, ≤72 chars. - Types in use here:
feat,fix,chore,docs,refactor,test. - Body (optional): explain the why, not the what. Wrap at 72 chars.
- Commit with a HEREDOC so formatting survives:
```bash
git commit -m "$(cat <<'EOF'
feat: <subject>
<optional body>
EOF
)"
```
- Pre-commit will run automatically. If it modifies files (auto-fix), re-stage and create a NEW commit — do not amend unless the user asks. If hooks fail with errors, fix the underlying issue and create a new commit; never bypass with
--no-verify.
- After the commit succeeds, run
git statusto confirm a clean tree and report the commit SHA + subject.
Do not
- Push to the remote unless the user asks.
- Add a
Co-Authored-Bytrailer unless the user has asked for one (this repo's history doesn't use them). - Use
--amendunless explicitly requested.