Code provenance layer

See the human and the AI grain in your code.

Grain measures how much of a repository was human-written vs AI-assisted — with a confidence level on every claim. Signals, not verdicts.

$ npx grain scan· MIT · runs locally
◆ acme/payments-servicehumanAIuncl.
73%
human
22%
AI-assisted
5%
uncl.
400
commits
Why now

Two trends just collided in every repo.

AI writes code freely, and maintainers have grown wary of what it wrote. Between them sits an unmet need: a neutral way to measure provenance.

Trend 01

AI commits on its own

Agents open PRs, keep tool-activity logs, and push commits directly. A diff is no longer presumed human.

“@OmniBlocks/boxy peace was never an option”— a developer replying to an AI bot on GitHub
Trend 02

Maintainers turned wary

Projects are rewriting contribution policy to demand transparency about AI use — but disclosure is honor-system today.

“To better reflect the community's AI-skeptical ('wary') sentiment, the policy itself has changed.”— maintainer, Bevy engine policy

The gap between them is trust. Grain is the instrument that measures it.

What it outputs

One command in. Three things out.

No dashboard to learn. Grain meets developers where they already look — the badge, the PR, and a file in the repo.

🌾 grain22% AI-assisted
01 · Badge

A README shield

The repo's human/AI mix, the way a coverage badge shows tests.

grain report · #482
62% of +214 lines carry AI signals
› 2 files touch src/auth/ (owned)
⚠ 1 human review requested
02 · PR check

A calm comment

Itemized, framed as signals — never an accusation.

73%
human-authored
03 · PROVENANCE.md

A nutrition label

A committable report of the whole repo, backed by grain.json.

How it reads the grain

Forensics, ranked by confidence.

Grain starts from hard evidence and only falls back to inference — and it reports a confidence score, never an accusation.

01

Declared signals

Co-Authored-By trailers, agent commits, bot accounts, explicit tags.

high confidence
02

Commit forensics

Burst timing, diff uniformity, the “all at once” shape of agent output.

inferred
03

Convention diffing

Did the change respect the repo's own style and CODEOWNERS?

inferred
04

Local model pass

Optional, for ambiguous diffs. Runs client-side; code never leaves the machine.

privacy-first
The principle

Signals, not verdicts.

Grain reports “62% of these lines carry AI signals” — never “this person cheated”. Inference is capped, declared signals are preferred, and it names its own limits.

Open core

The instrument is free. The org tooling is paid.

Everything that runs on a single repo, locally, is free and MIT. The open engine is what makes the numbers credible.

MIT · free forever

grain CLI

Solo devs & OSS maintainers
  • CLI, GitHub Action, badge
  • PROVENANCE.md + grain.json
  • Runs fully local
  • The full detection engine
Team · join the waitlist

grain Cloud

Teams shipping with agents
  • Org dashboard & trends
  • Merge-policy engine
  • Multi-repo rollups
  • Slack / PR gating
Compliance · talk to us

grain Audit

Regulated & enterprise
  • Signed provenance ledger
  • EU AI Act / SOC2 export
  • SSO & retention policy
  • On-prem option

See the grain of your codebase.

One command. MIT. Runs locally. Star it, try it, and put a provenance badge on your repo today.