Skip to main content

Commensa audit CLI — point it at a GitHub repo, get a one-page AI Rework Report.

Project description

commensa-audit

What % of your AI engineering effort went to fixing your AI's own work?

commensa-audit answers that from your git history. Point it at a GitHub repo; get a one-page report:

  • Rework tax — share of PRs (and changed lines) that corrected earlier work, vs. net-new value
  • Superseded work — PRs whose output was entirely replaced later (shown separately — discarded ≠ correcting)
  • Abandoned attempts — PRs closed without merging: the waste merge-based metrics never see
  • Churn clusters — chains of PRs rewriting each other ("it took 10 PRs to get dark mode right")
  • Line survival — how much merged code is still alive at the end of the window
  • Hotspots — rework share by module, against the repo-wide rate
  • Agent-marked share — "at least X% of PRs carry agent markers" (Co-Authored-By trailers, body signatures) — a stated lower bound, never an attribution claim

We built it because we needed it: our own agent-built product shipped 162 PRs in 13 days, and the audit showed 27% of them were the AI correcting itself.

Install & run

pip install commensa-audit
commensa-audit --repo owner/name --token $GH_TOKEN

Or straight from source:

pip install git+https://github.com/commensa-ai/commensa-audit

Output: report_<repo>.html (self-contained, forwardable), audit_<repo>.json (raw numbers), units.csv (per-PR data).

Privacy, by architecture

  • Read-only. GET requests only; a token with read scope is sufficient.
  • Local-first. Everything runs and stays on your machine. No telemetry, no phone-home, nothing leaves your network.
  • Inspectable. Pure Python, stdlib + requests + jinja2. Read every line before you run it.

How classification works (and its honest limits)

Every PR is classified by a transparent signal cascade — explicit corrective titles/reverts → self-correction (a PR predominantly undoing lines added in the prior N days) → churn-cluster membership → otherwise generative. Every classification in the output carries the signal that fired and a human-readable why. Thresholds live in one config block; tune them and re-run offline with --reuse.

Known limits (also printed in the report footer): classification is heuristic; squash merges blur attribution; survival windows mean young repos read optimistic; agent-marked share is a lower bound — absence of a marker is not evidence of human authorship. We grade our own certainty rather than fake precision — that's the whole point of the project.

Why "rework tax"?

Agent-era teams measure activity — PRs merged, lines shipped, velocity. None of that distinguishes progress from cleanup. The rework tax does: it's the share of motion that was correction, the closest git-only proxy for "how well was this work directed?" It won't tell you everything (cost-per-outcome needs token data git doesn't have — that's what we're building next) — but it's the most honest first number, and it's free.

The continuous version

This tool is a snapshot. Commensa is the trendline: continuous rework measurement by team and module, alerts, monthly executive reports — and the cost side git can't see, captured at the agent harness. First 25 companies: founding-partner terms.

measure the durable work, not the noise.

MIT licensed.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

commensa_audit-0.2.1.tar.gz (37.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

commensa_audit-0.2.1-py3-none-any.whl (33.5 kB view details)

Uploaded Python 3

File details

Details for the file commensa_audit-0.2.1.tar.gz.

File metadata

  • Download URL: commensa_audit-0.2.1.tar.gz
  • Upload date:
  • Size: 37.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for commensa_audit-0.2.1.tar.gz
Algorithm Hash digest
SHA256 e29f19498b086add44b58ec510c94567988d06ee361f32d0b779304fac9b782b
MD5 95a0a58bb65c65c99e7a9118c1842928
BLAKE2b-256 bcc6620adedd2966246220647648efb1fac23462d04ef5bbb9c0a8830cefdd95

See more details on using hashes here.

File details

Details for the file commensa_audit-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: commensa_audit-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 33.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for commensa_audit-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6b0913995e386028066a0882cc1dd5b117d1bafba7636adf1bf4a8c6a3ad6a2d
MD5 ae80afa0bd8405b0648dc3fa85089172
BLAKE2b-256 c5ff0fd52e9bbb361ed2a02164570b59e8f064d0be24ec79414a4ed210ed209c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page