Investigations

Gen-AI Commit Analyzer

Go October 2025

CLI tool measuring AI-generated code adoption across Git histories, with multi-repo analysis and team aggregation.

This grew from a question I kept asking: how much of our codebase is actually AI-generated? github-gen answers it by analysing Git histories and detecting `// gen start` / `// gen end` marker regions in code.

The CLI clones repositories from a manifest, traverses commit histories with go-git, and counts AI versus non-AI lines per commit. Results flow into SQLite for querying. You can aggregate by author, squad, or tribe with optional daily breakdowns.

The author normalisation is smarter than you'd expect — it combines .mailmap with a custom authors.yaml to handle the reality of developers using different emails across machines. File path inclusion/exclusion filters let you focus on specific languages or directories.

Incremental caching means re-analysing a growing repository only processes new commits. There's a proper CI pipeline with GitHub Actions, Go Report Card, and golden CSV outputs for regression testing.

What this project demonstrates

Detects AI-generated code via // gen start/end markers
Multi-repo analysis with configurable manifests
Aggregation by author, squad, tribe with daily breakdowns
Incremental caching — only processes new commits
Author normalisation via .mailmap + authors.yaml
CI with GitHub Actions, Go Report Card, golden CSV tests

Technologies

CLIGitAI AnalyticsGoSQLite

© 2026 Jonathan Leahy · v0.8.1-31-g196fa14