Skip to main content
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 a post-commit hook to automatically record provenance on every commit:
The generated hook script calls the ProvenanceKit API with the commit hash, author identity, and detected AI co-authors — no manual work per commit.

ext:git@1.0.0 Extension Schema

Every recorded commit gets ext:git@1.0.0 attached to its action:

Querying Code Provenance

Gotchas

  • Large repos: analyzeBlame on 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; provide GITHUB_TOKEN for 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-commit hook already exists, installHook appends 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.