commitlint-plugin-rai
v1.0.1
Published
Commitlint plugin for RAI footer validation
Maintainers
Readme
commitlint-plugin-rai
Installation 🔧
npm install --save-dev commitlint-plugin-raiUsage 🚦
Add the plugin to your commitlint.config.js:
export default {
extends: ['@commitlint/config-conventional'],
plugins: ['commitlint-plugin-rai'],
rules: {
'rai-footer-exists': [2, 'always'],
// Requires the Signed-off-by footer from `git commit -s`:
'rai-signed-off-by': [2, 'always'],
},
};Once this is in place, commitlint will refuse to proceed until a valid RAI trailer is present — and, with rai-signed-off-by enabled, a Signed-off-by: Your Name <email> footer too.
Valid Trailers 📌
Pick the one that matches the majority AI contribution. Skip it entirely and the commit fails. Extra footers are fine — the rule only checks that at least one valid footer exists.
No negotiations.
Authored-by: [Human] <email>— all you, no AI involvedCommit-generated-by: [AI Tool] <email>— AI wrote the commit message, you wrote the codeAssisted-by: [AI Tool] <email>— AI helped some, you were still drivingCo-authored-by: [AI Tool] <email>— roughly 50/50, like actual pair programmingGenerated-by: [AI Tool] <email>— AI did most of it, you supervised
All patterns are case-insensitive, because enforcing honesty does not require enforcing capitalization.
Why This Exists ⚖️
If two humans pair program, both names go on the commit. If an AI helps and we pretend it didn’t happen, that’s a choice, but it’s a strange one.
Git already supports trailers. This plugin just closes the gap between “we could do this” and “we actually do this,” by making attribution a default instead of a discussion.
If you want the longer version of that reasoning, it’s written up at Did AI Erase Attribution?.
This plugin is the boring enforcement layer that follows.
Requirements ⚙️
- Node.js >= 22.0.0, < 27.0.0
- @commitlint/cli >= 19.0.0
License 📄
PolyForm Shield License 1.0.0 — free to use anywhere, including inside commercial products. What's off the table: providing anything that competes with this tool — selling it, rebranding it, hosting it, or shipping a practical substitute, paid or free. This is a plain-language summary; the LICENSE is what actually controls. Commercial licensing questions: [email protected].
