Skip to content

jeffsinason/codeassay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CodeAssay

Git forensics tool for analyzing AI-authored code quality. Detects AI-generated commits, identifies rework, classifies root causes, and generates quality reports.

Install

pip install codeassay

Quick Start

# Scan a repository
codeassay scan /path/to/repo

# View a report
codeassay report

# Scan multiple repos with combined output
codeassay scan ../repo1 ../repo2 ../repo3

Commands

Command Purpose
codeassay scan <paths> Scan repos for AI commits and rework
codeassay report Generate quality report (CLI or markdown)
codeassay commits List AI-authored commits
codeassay rework List rework events with classification
codeassay reclassify <commit> <category> Override a classification
codeassay export --format json Export raw data
codeassay dashboard Open interactive HTML dashboard in browser

How It Works

AI Commit Detection identifies AI-authored commits via:

  1. Co-Authored-By trailers (Claude, Copilot, GPT)
  2. Branch naming patterns (Superpowers worktrees)
  3. Manual AI-Assisted: true trailers

Rework Detection traces subsequent commits that modify AI-authored lines using git blame ancestry within a configurable time window (default: 14 days).

Classification categorizes rework into 7 types using commit message keywords and diff shape analysis:

  • Bug fix, Misunderstanding, Test failure, Style/convention violation
  • Security issue, Incomplete implementation, Over-engineering

Dashboard

Generate an interactive HTML dashboard with charts and visualizations:

codeassay dashboard

Opens a self-contained HTML file in your browser with:

  • Summary metric cards (AI commit rate, first-pass success, rework rate, MTTR)
  • Rework category doughnut chart with percentages
  • Monthly trend line chart (AI commits vs rework events)
  • Top rework file hotspots
  • Rework by AI tool comparison

The dashboard works offline, requires no server, and is shareable — copy the HTML file to screenshot or embed in publications. Use --no-open to generate without opening the browser, or --output path.html to save to a custom location.

Ignoring Files

Create a .codeassayignore file in your repo root to exclude files from analysis. Uses gitignore-style patterns:

# Exclude documentation and config noise
*.md
.DS_Store
.organization

# Exclude a directory (one level)
docs/*

# Exclude a directory (recursive)
docs/**

Ignored files are filtered from both AI commit tracking and rework detection, giving you cleaner metrics focused on actual code quality.

Data Storage

Scan data is stored in .codeassay/quality.db (SQLite) inside each scanned repo. Query it directly with any SQL tool:

sqlite3 .codeassay/quality.db "SELECT tool, COUNT(*) FROM ai_commits GROUP BY tool"

Claude Code Plugin

Install as a Claude Code plugin to use /codeassay within Claude Code sessions.

License

MIT

About

Git forensics tool for analyzing AI-authored code quality

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages