I've been coding for years. I write tests (sometimes). I document things (occasionally). I commit at 2am more than I'd like to admit. I thought I was a decent developer — until I pointed a tool at my own git history and it called me Chaotic Evil.
Let me back up.
The Problem Nobody Talks About
We all have opinions about good git hygiene. "Write meaningful commit messages." "Keep commits small and focused." "Always write tests." We nod along in code reviews, say the right things in standups, and then go home and push a commit titled "fix stuff" at 11:47pm on a Saturday.
The uncomfortable truth: most of us have no idea what our actual commit behavior looks like. We think we're Lawful Good — disciplined, principled, consistent. Our git history tells a different story.
I wanted to build something that would hold up a mirror. Not in a judgmental way (okay, maybe a little judgmental), but in a way that was actually fun and grounded in real signals from your commit history. Something that would give you a D&D alignment — the same framework that tells you whether you're a paladin or a rogue — based on how you actually write code.
So I built git-personality.
Install It and Run It on Yourself
pip install git-personality
cd your-repo
git-personality
That's it. No API keys. No LLM calls. No telemetry. It reads your local git history and gives you a verdict.
Want to run it on a specific author, or limit to the last six months?
git-personality --author "yourname" --since "6 months ago"
git-personality --repo /path/to/other/repo
What the Output Looks Like
Here's actual terminal output from the tool (yours will vary — hopefully in a better direction than mine):
╔══════════════════════════════════════════════════╗
║ git-personality v0.1.0 ║
║ Analyzing: my-project (847 commits) ║
╚══════════════════════════════════════════════════╝
Analyzing commit history...
Dimension Scores
┌─────────────────────────┬────────────────────────────────────┬────────┐
│ Dimension │ Score │ Rating │
├─────────────────────────┼────────────────────────────────────┼────────┤
│ Commit Message Quality │ ████████░░░░░░░░░░░░ 38% │ Chaotic│
│ Commit Size Discipline │ ██████████████░░░░░░ 68% │ Lawful │
│ Timing Patterns │ ███░░░░░░░░░░░░░░░░░ 17% │ Chaotic│
│ Test Discipline │ █████░░░░░░░░░░░░░░░ 24% │ Evil │
│ Documentation Habits │ ████░░░░░░░░░░░░░░░░ 19% │ Evil │
│ Bug Fix Rate │ ████████████████░░░░ 80% │ Good │
└─────────────────────────┴────────────────────────────────────┴────────┘
Evidence
[!] 61% of commits are single-word or vague ("fix", "update", "wip")
[!] 43% of commits happened between 10pm and 4am
[!] Only 9% of commits touch test files
[!] Documentation updated in 6% of commits
[+] High bug-fix engagement: 80% of issues get follow-up commits
┌─────────────────────────────────────┐
│ Your Alignment: CHAOTIC EVIL 😈 │
│ Archetype: The Chaos Agent │
└─────────────────────────────────────┘
"You ship fast. You break things. You come back later, maybe.
Future-you has strong feelings about past-you."
Reader, I stared at that output for a full minute.
How It Actually Works
The tool runs entirely on local git data — no external services, no machine learning. It shells out to git log and parses the output in Python, then scores you across six dimensions that map onto two axes.
The Lawful ↔ Chaotic axis measures how consistent and principled your process is:
- Commit message quality — Does your message follow a convention (conventional commits, issue refs)? Or is it "asdf" at 2am?
- Commit size discipline — Are your commits small, focused changesets? Or 47-file blasts that touch everything?
- Timing patterns — Consistent working hours signal a structured process. Late-night weekend commits suggest you're winging it.
The Good ↔ Evil axis measures how much you invest in the health of the codebase:
- Test discipline — What fraction of your commits touch test files? (9% is not great.)
- Documentation habits — Do you update docs alongside features, or treat them as Optional?
- Bug-fix rate — How often do you follow up on your own bugs vs. leaving them for someone else?
Each dimension is scored 0–100 based on thresholds derived from real open-source repo data. The two axis scores are averaged, then mapped to one of nine alignments.
The Nine Alignments
| Lawful | Neutral | Chaotic | |
|---|---|---|---|
| Good | The Senior Engineer | The Pragmatist | The Well-Meaning Hacker |
| Neutral | The Process Follower | The Developer | The Cowboy |
| Evil | The Corporate Drone | The Tech Debtor | The Chaos Agent |
Each archetype gets a short description. "The Senior Engineer" ships small, well-labeled commits with tests and docs. "The Corporate Drone" follows process religiously but never touches tests. "The Chaos Agent" (hi, it me) ships fast, commits at midnight, and leaves debugging as an exercise for the reader.
Running It on Famous Repos Would Be Fascinating
I haven't yet published results from running this on major open source projects, but the thought experiment is fun. Linux kernel patches are famously disciplined — Linus has famously strong opinions about commit message quality, which would score very Lawful. A startup's early prototype repo from 2012? Probably Chaotic Evil. The React repo probably hovers around Lawful Neutral — lots of test discipline, but the commit messages have gotten more conventional over time.
If you run it on a well-known repo and get interesting results, open an issue and share the output. I'd genuinely love to see it.
What I Learned Building This
-
Git's CLI is surprisingly rich for analysis.
git log --numstat --no-mergesgives you everything you need: message, timestamp, author, and per-file line counts. No gitpython needed. - Thresholds are hard. What's a "good" test coverage ratio in commit history? I iterated a lot. The current thresholds feel right but are absolutely contestable.
- The Rich library makes CLI output genuinely delightful. The bar charts and styled panels took maybe 30 minutes to implement and make the tool feel 10x more polished than plain print statements.
- Self-deprecating tools get engagement. The framing of "it called me Chaotic Evil" is more interesting than "it gave me a score of 42/100." Personality framing makes people actually want to run it.
-
Publishing a pip package is easier than I thought.
pyproject.toml+hatch+ a GitHub Actions release workflow, and you're on PyPI. The friction was mostly psychological.
Try It on Your Own Repo
I genuinely think this is useful beyond the fun framing. If you run it and see "61% of commits are vague," that's actionable. If it surfaces that you never touch test files, that's worth knowing. The alignment is the hook; the evidence list is the real output.
pip install git-personality
git-personality
The source is on GitHub: https://github.com/LakshmiSravyaVedantham/git-personality
PRs welcome. Especially if you want to add more alignments, improve the scoring thresholds, or add a --shame flag that posts your results to Slack.
What alignment did you get? Drop it in the comments.
Top comments (0)