diff --git a/.ai/instructions/skills/git.instructions.md b/.ai/instructions/skills/git.instructions.md index d34871e..8ea643e 100644 --- a/.ai/instructions/skills/git.instructions.md +++ b/.ai/instructions/skills/git.instructions.md @@ -56,3 +56,23 @@ Format: ``` Types: `feat`, `fix`, `docs`, `refactor`, `chore` + +### Commit message rules + +**Only include what actually changed in this commit.** + +- Run `git diff --staged` (or `git diff` if nothing staged) and read it fully before writing +- List only files and lines that appear in the diff +- If a file appears in the diff but only has whitespace or comment changes, omit it from the body +- Never mention changes that are not in the diff — even if you remember discussing them earlier in the session +- If unsure whether something changed, check the diff — do not guess + +**Format rules:** +- Subject line: max ~72 chars, imperative mood ("Fix", "Add", "Remove" — not "Fixed", "Added") +- Body: optional, only when the *why* is not obvious from the diff +- No bullet-pointed list of every file changed unless the diff spans many unrelated files +- No "CHANGES:" headers, no file-by-file breakdowns for single-topic commits +- No "Expected:", "Result:", "Impact:" or any speculative outcome sections — commit messages describe what changed, not what is predicted to happen +- Bullet points state *what* changed, not *why it was wrong* or *how it works* — keep each line short and factual + - ✅ `use MC_HOST_minio for S3 auth` + - ❌ `Use MC_HOST_minio env var for direct S3 auth (no mc alias set)`