https://github.com/anchildress1/rai-lint
Dual-language linter for Responsible AI commit footers β shared logic for Node (@commitlint) and Python (gitlint).
https://github.com/anchildress1/rai-lint
ai attribution-tracking commitlint commitlint-plugin gitlint
Last synced: 1 day ago
JSON representation
Dual-language linter for Responsible AI commit footers β shared logic for Node (@commitlint) and Python (gitlint).
- Host: GitHub
- URL: https://github.com/anchildress1/rai-lint
- Owner: anchildress1
- License: other
- Created: 2025-10-31T20:36:50.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2026-06-23T00:57:22.000Z (4 days ago)
- Last Synced: 2026-06-23T02:21:40.255Z (4 days ago)
- Topics: ai, attribution-tracking, commitlint, commitlint-plugin, gitlint
- Language: Python
- Homepage:
- Size: 1.77 MB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Codeowners: .github/CODEOWNERS
- Security: SECURITY.md
- Agents: AGENTS.md
Awesome Lists containing this project
README

**Stop playing hide-and-seek with AI in your commits.**
_A dual-language validation framework that makes AI attribution non-negotiable._
---
### π Project Stats
[](https://github.com/ChecKMarKDevTools/rai-lint/stargazers) [](https://github.com/ChecKMarKDevTools/rai-lint/issues) [](https://github.com/ChecKMarKDevTools/rai-lint/releases) [](LICENSE)
[](https://sonarcloud.io/summary/new_code?id=checkmarkdevtools_rai-lint) [](https://sonarcloud.io/summary/new_code?id=checkmarkdevtools_rai-lint) [](https://sonarcloud.io/summary/new_code?id=checkmarkdevtools_rai-lint) [](https://sonarcloud.io/summary/new_code?id=checkmarkdevtools_rai-lint)
### π£οΈ Languages
[](https://developer.mozilla.org/en-US/docs/Web/JavaScript) [](https://www.typescriptlang.org/) [](https://www.python.org/)
### π¦ Packages
[](https://www.npmjs.com/package/@checkmarkdevtools/commitlint-plugin-rai) [](https://pypi.org/project/gitlint-rai/)
### π€ AI & Automation
[](https://verdent.ai) [](https://github.com/features/copilot) [](http://chatgpt.com) 
### π§ Quality & Standards
[](https://conventionalcommits.org/) [](https://commitlint.js.org/) [](https://eslint.org/) 
 
---
[Installation](#installation-) β’ [Quick Start](#quick-start-) β’ [Required Commit Footers](#required-commit-footers-) β’ [Documentation](/docs)
---
## What is this? π€
CheckMarK RAI Lint enforces **Responsible AI (RAI) attribution** in every commit. No more "who wrote this?" moments. No more mystery code. Just honest, trackable AI contributions.
**Read the full story:** [Did AI Erase Attribution? Your Git History Is Missing a Co-Author](https://dev.to/anchildress1/did-ai-erase-attribution-your-git-history-is-missing-a-co-author-1m2l)
```mermaid
%%{init: {'theme':'dark'}}%%
flowchart LR
A[Developer Commits] --> B{Has AI Footer?}
B -->|Yes| C[Commit Accepted β
]
B -->|No| D[Commit Rejected β]
C --> E[Clear AI Attribution]
D --> F[Add Footer & Retry]
```
### Why does this exist?
Because transparency matters. When AI writes code, everyone should know. This isn't about fear or compliance theaterβit's about building trust and maintaining clear audit trails.
---
## Features π―
### π **Enforcement by Default**
Blocks commits without valid AI attribution footers. No exceptions.
### π **Dual-Language Support**
Native plugins for both JavaScript/TypeScript (`commitlint`) and Python (`gitlint`).
### π **Five Attribution Levels**
From human-only to AI-generated, track exactly who did what.
### β‘ **Zero Config Start**
Works out-of-the-box with sensible defaults. Customize when ready.
---
## Required Commit Footers π·οΈ
Every commit **must** include:
1. **One AI attribution footer** (pick the one that fits)
2. **Signed-off-by footer** (recommended for complete accountability)
> **π‘ Best Practice:** While only the RAI footer is strictly enforced, combining it with `Signed-off-by` creates a complete audit trailβAI attribution plus human accountability. We strongly recommend enforcing both.
### AI Attribution Footers
Pick **one** of these based on AI involvement:
Footer Format
When to Use
Example
Authored-by
Human-only work, zero AI involvement
Authored-by: Jane Doe <jane@example.com>
Commit-generated-by
Trivial AI help (docs, messages, reviews)
Commit-generated-by: ChatGPT <chatgpt@openai.com>
Assisted-by
AI helped, but human did primary work
Assisted-by: GitHub Copilot <copilot@github.com>
Co-authored-by
Roughly 50/50 AI and human split
Co-authored-by: Verdent AI <verdent@verdent.ai>
Generated-by
Majority AI-generated code
Generated-by: GitHub Copilot <copilot@github.com>
### Signed-off-by Footer
**Human accountability.** This is YOUR stamp confirming you reviewed and take responsibility for the AI attribution above.
Format: `Signed-off-by: Your Name `
**Automate it:** `git commit -s` (or `--signoff`)
> [!NOTE]
> All patterns are case-insensitive and follow the [Git trailer format](https://git-scm.com/docs/git-interpret-trailers). Email addresses **must** use angle brackets (`Name `) β this is stricter than Git's spec but matches Git's own convention and ensures consistency.
>
> **By default, only RAI footers are enforced.** The `signed-off-by-exists` rule is available separately and can be enabled in your configuration for complete accountability.
---
## Installation π¦
### Node.js / Commitlint
```bash
npm install --save-dev @checkmarkdevtools/commitlint-plugin-rai
```
**Configure in `commitlint.config.js`:**
```javascript
export default {
extends: ['@commitlint/config-conventional'],
plugins: ['@checkmarkdevtools/commitlint-plugin-rai'],
rules: {
'rai-footer-exists': [2, 'always'],
'signed-off-by-exists': [2, 'always'],
},
};
```
### Python / Gitlint
```bash
uv add gitlint-rai
```
**Configure in `.gitlint`:**
```ini
[general]
contrib = gitlint_rai.rules.RaiFooterExists,gitlint_rai.rules.SignedOffByExists
```
---
## Quick Start π
### Hook Integration
Lefthook
```yaml
pre-push:
commands:
sonar-scan:
run: npx dotenv -- npx sonar-scanner
commit-msg:
commands:
commitlint:
run: npx --no-install commitlint --edit {1}
```
Husky
```bash
npx husky add .husky/commit-msg 'npx --no-install commitlint --edit $1'
```
pre-commit
```yaml
repos:
- repo: local
hooks:
- id: gitlint
name: gitlint
entry: gitlint
args: [--msg-filename]
language: python
stages: [commit-msg]
```
---
## Monorepo Structure π οΈ
```
rai-lint/
βββ packages/
β βββ node-commitlint/ # Node.js/ESM plugin
β β βββ src/
β β β βββ rules/
β β β β βββ rai-footer-exists.ts
β β β βββ index.ts
β β |ββ package.json
β β βββ tests/
β β
β βββ python-gitlint/ # Python plugin
β βββ gitlint_rai/
β β βββ __init__.py
β β βββ rules.py
β βββ tests/
β βββ pyproject.toml
β
βββ docs/ # Documentation
```
---
## Contributing π€
Contributions welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
---
## License π
Look, I'm not gonna hide behind a wall of legalese here.
This runs on [Polyform Shield License 1.0.0](./LICENSE). That's **not open source** β but before you rage-quit, hear me out.
**What this means in actual English:**
Use it. Break it. Fix it. Ship it in your CI pipeline at work. Hell, use it to enforce commit messages on your team and become the office villain. I'm cool with all of that.
What I'm _not_ cool with? Someone spinning this up as "AI Lint Pro" with a $99/month subscription and a fancy landing page. If you want to make money off this code, we should probably have a conversation first.
**The vibe:** This is a tool to solve a real problem β AI attribution in commits is messy, and someone needed to standardize it. If you're using it for that purpose, internal or otherwise, you're good. If you're thinking about monetizing it... let's chat.
Sound fair? Cool. Now go lint some commits. π
---
## Show Some Love π«Ά
If you find this project useful or want to support its development, consider starring the repo or connecting with me!
[](https://www.buymeacoffee.com/anchildress1) [](https://dev.to/anchildress1) [](https://www.linkedin.com/in/anchildress1/)
---
_Stop guessing. Start tracking._
**Co-authored-by: Verdent AI & GitHub Copilot**