Skip to main content

Local CLI plotting AI spend against engineering throughput

Project description

AI Eng Audit

Plot AI tool spend against engineering throughput on a shared chart. Local, open-source, one command.

What it is

Over the last year a lot of teams burned real money on Claude, Cursor, Copilot, and the rest. The invoices are clear; the output is not.

The tool reads your local git history, PR data, and (optionally) the billing CSV you export from your AI vendor, putting spend and shipped output on the same timeline. You see:

  • total AI spend over the window, broken out by month
  • PRs merged to the default branch and the L1 ship rate
  • PRs opened and then closed, merged and then reverted, or open for too long

How to use it

export GITHUB_TOKEN=ghp_xxxxx
pip install ai-eng-audit
ai-eng-audit scan --repo /path/to/your/repo --window 90d \
    --billing ~/Downloads/anthropic_cost.csv \
    --billing ~/Downloads/openrouter_activity.csv

Python 3.11+. Generate a GITHUB_TOKEN PAT at https://github.com/settings/tokens with repo scope.

Add --lang zh for Chinese narrative; section labels, metric names, and technical terms (PR, L1, scope_alignment, etc.) stay English in both locales.

--billing can be repeated. Currently supports the Anthropic Console cost export and the OpenRouter Activity export (auto-detected by header). Omit --billing to get the git + PR report only.

Add --format json for JSON output. Metric definitions, supported vendors, and scope-alignment rules are in docs/methodology.en.md.

What the report looks like

A run looks roughly like this (numbers are synthetic):

ai-eng-audit / your-repo / 2026-02-26 → 2026-05-27 (90d)

10 authors opened 187 PRs over 90d. 142 reached `main` (75.9% of scanned, 84.0%
of resolved). 27 closed without merging. 18 still in flight — 4 open > 30d.
Explicit revert <14d: 2. Org-level AI spend $4,231.50 (anthropic, openrouter);
throughput is repo-level (scope mismatch).

spend:
  2026-03:                    $1,124.00
  2026-04:                    $1,572.30
  2026-05:                    $1,535.20
  total:                      $4,231.50  (anthropic $1,387.10; openrouter $2,844.40)
  scope_alignment:            mismatch
  sources:                    anthropic_cost.csv, openrouter_activity.csv

throughput:
  PRs opened:                 187
  PRs merged (L1 proxy):      142  (75.9% scanned / 84.0% resolved)
  PRs closed w/o merge:       27
  PRs in flight:              18
  commits to main:            312
  unique authors:             10
  top-5 commit share:         72.3% (names withheld by design)

friction:
  abandoned:                  27  (14.4% of opened)
  long-lived open > 30d:      4
  explicit revert < 14d:      2

commits by ISO week:
  2026-W09  18
  2026-W10  25
  2026-W11  32
  2026-W12  29
  2026-W13  21
  2026-W14  18
  2026-W15  24
  2026-W16  31
  2026-W17  28
  2026-W18  35
  2026-W19  26
  2026-W20  19
  2026-W21  6

—
methodology v0.2-draft. definitions in docs/methodology.md.
workflow signals only; not personnel evaluation. Tier 2 per-PR AI attribution arrives in later versions.

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

ai_eng_audit-0.3.0.tar.gz (20.3 kB view details)

Uploaded Source

Built Distribution

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

ai_eng_audit-0.3.0-py3-none-any.whl (20.6 kB view details)

Uploaded Python 3

File details

Details for the file ai_eng_audit-0.3.0.tar.gz.

File metadata

  • Download URL: ai_eng_audit-0.3.0.tar.gz
  • Upload date:
  • Size: 20.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for ai_eng_audit-0.3.0.tar.gz
Algorithm Hash digest
SHA256 9964b1a5843627051e69a90ca796f3b2061181174ccfa06e3a007eb710e4c611
MD5 d61c388cb3e1a37a123522ecdef6dacb
BLAKE2b-256 0341c8012b12aa4766430f96819deb8ac5b11b82812d4c08b5f1e2de96091843

See more details on using hashes here.

File details

Details for the file ai_eng_audit-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: ai_eng_audit-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 20.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for ai_eng_audit-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bad2ca5b3ab82d40366867a4dec08621cd97b7c0a04388e05dc272e2f12b09fe
MD5 ef9e0aac27bd22f6d41a3b66b20551d6
BLAKE2b-256 d77569d063606f3f3a90cad9d807c88727496d785e4ca3ba1bc1f16aae7bbd9c

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