| name | git-commit |
| description | Use when committing code changes — guides commit message structure, type selection, and body content following Conventional Commits format |
Ruby Commit Message
Overview
Write structured commit messages following Conventional Commits. The body should help a junior Ruby on Rails developer understand the change during a debugging session.
Format
<subject>
<body>
<footer>
Subject Line Rules
The Commit subject is short, imperative and explains what the change is for. It must begin with
one of only these five prefixes:
-
Add
-
Update
-
Fix
-
Remove
-
Refactor
-
If we worked on a ticket, include the ticket id and title in the body.
-
Imperative mood: "Add", "Fix", "Update", "Remove"
-
Present tense: "Add feature" not "Added feature"
-
Capitalized first letter, no period at end
-
Maximum 70 characters
Body Guidelines
Commit bodies are written as paragraphs. Each paragraph is properly capitalized and reads like a
page out of a book. Each paragraph is devoted to a single idea and uses proper punctuation. Add any
useful information that would help a junior Ruby developer understand the impact of the change, why
the change was done.
It needs to explain the following:
- WHY — motivation, problem, or user impact. Use context if it exists for this.
- WHAT changed — make this brief; the diff already shows the HOW
- HOW — only when there are details about the how that are not reflected by the code or the naming in the code
Call out tradeoffs when supported by context. Do not invent details.
Footer & AI Attribution
Fixes TICKET-123 # or: Fixes #123, Refs TICKET-123
BREAKING CHANGE: ... # for breaking changes; use ! in type too: feat(api)!:
Common Mistakes
| Mistake | Fix |
|---|
| Body explains HOW without context | Only include HOW when it helps debugging |
| Subject describes implementation ("Changed X to Y") | Use imperative: "Fix X", "Add Y" |
| Body repeats what the diff shows | Explain WHY it was changed |
| Subject over 70 characters | Trim scope or rephrase |
| "Generated by AI" in body | Omit completely |