git-commit-disciplinelisted
Install: claude install-skill kookr-ai/kookr
# Git Commit Discipline
Rules for AI agents making git commits that are safe, atomic, traceable, and CI-friendly.
**Research:** `docs/deepresearch/reports/Git Commit Discipline for AI Coding Agents.md`
## Non-Negotiable Rules
| # | Rule | Violation Example | Correct Pattern |
|---|------|-------------------|-----------------|
| 1 | **Conventional Commits** | `git commit -m "fix"` | `git commit -m "fix(auth): prevent token reuse after logout"` |
| 2 | **Atomic commits** | One commit with feature + refactor + docs | Separate commits per logical change |
| 3 | **Never commit to main/master** | `git push origin main` | Work on feature branch, merge via PR/quality-gate |
| 4 | **No `git add .`** | `git add .` (catches junk, secrets) | `git add src/file.ts test/file.test.ts` (named files) |
| 5 | **No force-push on shared branches** | `git push -f origin develop` | `git push --force-with-lease` on personal branches only |
| 6 | **Never commit secrets** | `git add .env` | Scan staged files; block `.env*`, tokens, API keys |
| 7 | **Never bypass quality gates** | `git commit --no-verify` | Run lint + tests + commitlint before every commit |
| 8 | **Body explains WHY** | Subject-only commit for non-trivial changes | Add body with motivation, not implementation details |
| 9 | **Commits must not break CI** | Committing code that fails lint/tests | Verify green before committing |
| 10 | **Always `--no-ff` for merges** | `git merge feature` (fast-forward) | `git merge --no-ff featur