Two distinct problems:
a) Word count threshold at 10 is too strict for infrastructure commits. The RETROSPECTIVE already flagged this. Infrastructure commits tend toward noun phrases ("Add test infrastructure for statistics module") which score low on word count despite being genuinely specific. 7 words is the right threshold, as the RETROSPECTIVE suggested.
b) Conventional prefix + minimum word count not enforced together. Currently feat: a passes the quality gate because it has the conventional prefix. A commit that's feat: fix (2 words) reads as quality. Adding a minimum word count of 4 even for conventional commits would catch this without over-filtering.
Concretely:
conventional = /^(feat|fix|...)((.+))?:/i.test(message)
&& message.split(' ').length >= 4 // add this
specific = message.split(' ').length >= 7 // lower from 10
Two distinct problems:
a) Word count threshold at 10 is too strict for infrastructure commits. The RETROSPECTIVE already flagged this. Infrastructure commits tend toward noun phrases ("Add test infrastructure for statistics module") which score low on word count despite being genuinely specific. 7 words is the right threshold, as the RETROSPECTIVE suggested.
b) Conventional prefix + minimum word count not enforced together. Currently feat: a passes the quality gate because it has the conventional prefix. A commit that's feat: fix (2 words) reads as quality. Adding a minimum word count of 4 even for conventional commits would catch this without over-filtering.
Concretely:
conventional = /^(feat|fix|...)((.+))?:/i.test(message)
&& message.split(' ').length >= 4 // add this
specific = message.split(' ').length >= 7 // lower from 10