Rien ne tenait la convention sur le sujet : le tag est respecté partout,
c'est la longueur qui glisse. Le hook refuse le mécanique et rien de plus
— tag absent, plus de 72 caractères, sujet ouvrant sur une citation ; dire
sur quoi porte le code reste un jugement qu'aucun hook ne rendra. Il compte
des caractères et non des octets, sans quoi un sujet français de 72
caractères tomberait sur ses accents. Le refus enseigne le repli vers des
mots-clés plutôt que la troncature, et nomme `--no-verify` : un garde-fou
qui refuse trop est désinstallé. Les tests pèsent donc autant les
acceptations, « Merge branch » ou fixup de rebase. Le lanceur balaie le
préfixe test_git_ : 32 tests jamais exécutés, le total va de 1021 à 1071.
--- EN ---
Nothing held the subject convention: the tag is respected everywhere, it
is the length that slips. The hook refuses the mechanical and nothing more
— no tag, over 72 characters, a subject opening on a quotation; whether it
says what the code is about stays a judgement no hook will make. It counts
characters, not bytes, or a 72-character French subject would fall on its
accents. The refusal teaches the fallback to keywords rather than
truncation, and names `--no-verify`: a guard rail that refuses too much
gets uninstalled. So the tests weigh the acceptances as much, a "Merge
branch" or a rebase fixup. The runner sweeps the test_git_ prefix: 32
tests never ran, and the total goes from 1021 to 1071.
Assisted-by: Claude Opus 5
(cherry picked from commit c9abf4d1b723ae8ff3762d39bfe1d6982400d12d)
Le manuel encadrait le corps en détail — pourquoi, dix lignes par langue, ce
qu'on ne répète pas du diff — et ne disait du sujet que « courte, à
l'impératif ». Le sujet est pourtant lu cent fois pour une fois que le corps
l'est : git log --oneline, un blame, un bisect, une note de version.
Faute de règle, les sujets dérivent vers le symptôme et la métaphore, qui se
lisent bien sans nommer la partie du système en jeu. La règle ajoute une
épreuve, pas un gabarit : lire le sujet seul, sans diff ni corps, et savoir
ce qui change et où. Les trois exemples avant/après viennent de l'historique
du dépôt, un exemple inventé ne convainquant personne.
--- EN ---
The manual framed the body in detail — why, ten lines per language, what not
to repeat from the diff — and said of the subject only that it be short and
imperative. Yet the subject is read a hundred times for every reading of the
body: git log --oneline, a blame, a bisect, a release note.
With no rule, subjects drift towards the symptom and the metaphor, which read
well without naming the part of the system at stake. The rule adds a test,
not a template: read the subject alone, with no diff and no body, and be able
to say what changes and where. The three before/after pairs come from the
repository's own history, an invented example convincing nobody.
Assisted-by: Claude Opus 5
(cherry picked from commit c86357eab899c65f41287d4f19e88d0da98285c4)
The template wrote « Generated by Claude Code », the form AI_POLICY.md
replaces with the Assisted-by trailer. Three defects rode along: the model
came from ~/.claude/settings.json, which has no model key here, so it
declared the sonnet default rather than the truth; --author alone failed on
the committer, this checkout having no git identity; and [UPD] was missing
from the tag table while being the most used tag, 134 of the last 400.
The model now comes from the session transcript, the only source that
follows a /model switch — checked, it prints Claude Opus 5. The timezone is
left to the system so contributors keep their own, and the menu substitutes
name and email separately, the placeholders no longer being adjacent.
--- FR ---
Le gabarit écrivait « Generated by Claude Code », la forme que AI_POLICY.md
remplace par le trailer Assisted-by. Trois défauts l'accompagnaient : le
modèle venait de ~/.claude/settings.json, sans clé model ici, si bien qu'il
déclarait le défaut sonnet plutôt que la vérité ; --author seul échouait sur
le committer, ce checkout n'ayant aucune identité git ; et [UPD] manquait au
tableau des tags alors qu'il est le plus utilisé, 134 des 400 derniers.
Le modèle vient désormais de la transcription de session, seule source qui
suive un changement par /model — vérifié, elle rend Claude Opus 5. Le fuseau
est laissé au système, pour que chaque contributeur garde le sien, et le
menu substitue nom et courriel séparément, les jetons n'étant plus accolés.
Assisted-by: Claude Opus 5
The previous template used a piped shell command to detect the
active model, which caused permission errors in sandboxed
environments. Replace with a simple Python script approach and
add disable-model-invocation for reliability.
Generated by Claude Code 2.1.72 model claude-opus-4-6
Co-Authored-By: Mathieu Benoit <mathben@technolibre.ca>
Provide developers with a streamlined way to configure Claude Code
commit templates directly from the TODO CLI, reducing manual setup
and ensuring consistent commit formatting across the team.
Generated by Claude Code 2.1.72 model claude-opus-4-6
Co-Authored-By: Mathieu Benoit <mathben@technolibre.ca>