Commitlint plugin for RAI footer validation
npm install @checkmarkdevtools/commitlint-plugin-rai
src="https://raw.githubusercontent.com/ChecKMarKDevTools/admin-things/main/assets/logos/checkmark-rai-lint-logo.png"
alt="ChecKMarK RAI"
width="160"
/>
A commitlint plugin that enforces exactly one thing:
if AI touched the code, say so in the commit. ⚖️
That’s it. No philosophy, no negotiations. Pick a trailer and move on.
``bash`
npm install --save-dev @checkmarkdevtools/commitlint-plugin-rai
Add the plugin to your commitlint.config.js:
`js`
export default {
extends: ['@commitlint/config-conventional'],
plugins: ['@checkmarkdevtools/commitlint-plugin-rai'],
rules: {
'rai-footer-exists': [2, 'always'],
},
};
Once this is in place, commitlint will refuse to proceed until a valid RAI trailer is present.
Pick exactly one.
Skip it and the commit fails.
Use more than one and the commit also fails.
No negotiations.
1. Authored-by: [Human] — all you, no AI involvedCommit-generated-by: [AI Tool]
2. — AI wrote the commit message, you wrote the codeAssisted-by: [AI Tool]
3. — AI helped some, you were still drivingCo-authored-by: [AI Tool]
4. — roughly 50/50, like actual pair programmingGenerated-by: [AI Tool]
5.
All patterns are case-insensitive, because enforcing honesty does not require enforcing capitalization.
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.
- Node.js >= 20.0.0
- @commitlint/cli >= 19.0.0
PolyForm Shield License 1.0.0