# Clone the repository
git clone https://github.com/openshift-hyperfleet/rh-hooks-ai.git
cd rh-hooks-ai
# Install pre-commit (or prek: https://prek.j178.dev/)
pip install pre-commit
# Install hooks (includes conventional commit enforcement)
pre-commit install --hook-type commit-msg
# Test your changes
pre-commit run --all-filesrh-hooks-ai/
├── hooks/ # Hook implementations
│ ├── check_rh_precommit.py
│ ├── validate_agents_md.py
│ └── ai_attribution_reminder.py
├── configs/
│ └── baseline.yaml # Example config
├── templates/
│ ├── AGENTS.md.template
│ └── gitmessage.txt
├── bootstrap/
│ └── quick-setup.sh # One-command setup
├── .pre-commit-hooks.yaml # Hook definitions
└── README.md
# Test a specific hook
python hooks/check_rh_precommit.py
# Test all hooks via pre-commit
pre-commit run --all-files
# Test on specific files
pre-commit run --files AGENTS.mdThis project uses Conventional Commits for automated versioning.
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
Types:
feat:- New feature (minor version bump)fix:- Bug fix (patch version bump)docs:- Documentation changeschore:- Maintenance tasksrefactor:- Code refactoringtest:- Test changesci:- CI/CD changes
Examples:
feat: add version checking hook
fix(hooks): correct regex pattern in validation
docs: update README with versioning info
feat!: breaking change to hook API
Releases are automated via release-please:
- Commit changes using conventional commit format
- Push to main branch
- release-please creates/updates a release PR
- When PR is merged, a new version is tagged and released
- baseline.yaml is automatically updated with the new version