Attach provenance to every commit: who wrote what, what percentage was AI-assisted, and which tools were involved. Auto-detect GitHub Copilot, Claude, ChatGPT, Cursor, and Aider.
Installation
Recording a Single Commit
AI Co-Author Detection
ProvenanceKit automatically scans commit messages, file names, and diff patterns to detect AI-assisted code:Git Blame → Contribution Weights
Analyse a file’s full history to compute contribution weights per author:Whole-repo blame
Record Multiple Commits
Record a range of commits as a batch (e.g. on release):GitHub Integration
Record pull request provenance via the GitHub API:Git Hooks (Automatic Recording)
Install apost-commit hook to automatically record provenance on every commit:
ext:git@1.0.0 Extension Schema
Every recorded commit getsext:git@1.0.0 attached to its action:
Querying Code Provenance
Gotchas
- Large repos:
analyzeBlameon a large monorepo can be slow. Run it on specific files or directories, not the entire repo. Cache results between runs. - GitHub rate limits: The GitHub integration uses
@octokit/rest. Unauthenticated requests are limited to 60/hour; provideGITHUB_TOKENfor 5,000/hour. - AI detection confidence:
"high"means a definitive marker was found (Co-authored-by header)."medium"means a strong pattern (tool config file)."low"means heuristic detection only. Don’t treat"low"as definitive. - Hook conflicts: If a
post-commithook already exists,installHookappends to it rather than replacing it. Check your existing hooks before installing. - Binary files: Blame analysis skips binary files. Only text-tracked files are analysed.