From: Anderson A. Giacomolli Date: Wed, 11 Nov 2026 14:19:30 +0000 (-0300) Subject: Check the complete message before committing X-Git-Url: https://git.giacomolli.uk/onechat/commitdiff_plain/d7f6fba630444f5065f59cd3729feab92c7798aa?hp=c76d3832afce8da932860294d27bd167bf8a928c Check the complete message before committing The commit procedure checks the final message file with every trailer before signing it. The commit uses that same file without later trailer edits. Commit prose fills 72-column lines; the source-comment reflow tool has an 80-column limit and is not the commit formatter. Issue: 3cdc678 --- diff --git a/.agents/skills/commit/SKILL.md b/.agents/skills/commit/SKILL.md index 14ea4b3..d25a3fb 100644 --- a/.agents/skills/commit/SKILL.md +++ b/.agents/skills/commit/SKILL.md @@ -14,11 +14,14 @@ description: Commit procedure and message rules. Use for every commit. 2. Do the `check` skill. All checks must pass before you commit. 3. Stage only the files that belong to this change. Keep unrelated changes in separate commits. -4. Write the message to a file or a here-document and sign the commit - with the configured key, using `git commit -S -F`. Never put `\n` in - `git commit -m`. -5. When `.githooks/commit-msg` rejects the message, fix the message and - commit again. Do not skip the hook with `--no-verify`. +4. Write the complete message to a file, including all trailers. Add + trailers with `git interpret-trailers --trailer` before the check, + not after it. Never put `\n` in `git commit -m`. +5. Run `sh .githooks/commit-msg MESSAGE_FILE` on that final file before + `git commit`. Fix every failure and run the check again. Sign with + the configured key, using `git commit -S -F MESSAGE_FILE` on the same + file. Do not add or change trailers after the check. The normal + commit hook still runs. Never skip it with `--no-verify`. 6. Cryptographically verify each new commit's signature against the configured key before reporting completion. A signature header alone is not verification. If verification fails, stop and report it. Do @@ -46,7 +49,9 @@ description: Commit procedure and message rules. Use for every commit. - Separate the subject from the body with exactly one blank line. - Always write a body. Wrap each line at 72 characters. Fill each line - of a paragraph before you wrap it. + of a paragraph before you wrap it. `bin/reflow` formats source + comments at 80 columns, not commit prose. Do not use it to format a + commit message. - Write in the present-tense declarative mood. - Start with a direct summary of the complete change. Do not only repeat the subject. @@ -60,8 +65,9 @@ description: Commit procedure and message rules. Use for every commit. - When the change belongs to an issue, end the message with one `Issue:` trailer. Use the shortest unique git-bug issue ID in the `Issue:` trailer, with a minimum of seven characters. Check uniqueness against - all issues, not only open issues. Add it with `git commit --trailer`. - Never use a closing keyword such as "Fixes" or "Closes". + all issues, not only open issues. Assemble it with + `git interpret-trailers --trailer` before the message check. Never use + a closing keyword such as "Fixes" or "Closes". - Link the bug report when a change fixes a reported bug. - Do not add an AI tool as co-author. Do not add attribution trailers.