Skip to main content

Deterministic, polyglot code quality scoring with governance integration

Project description

Arbiter

CI PyPI Python 3.11+ License Dependencies

Agent-aware code quality scoring for multi-agent codebases.

In 2026, code is written by fleets of AI agents. Arbiter knows who wrote each line -- human or AI -- and scores quality accordingly.

Install

pip install arbiter                  # core (stdlib only)
pip install "arbiter[analyzers]"     # + ruff, radon, vulture, bandit

# Or from source
git clone https://github.com/hummbl-dev/arbiter.git && cd arbiter
pip install -e ".[analyzers]"

Usage

# Quick score -- no persistence, instant feedback
arbiter score /path/to/repo

# Full analysis with per-commit agent attribution
arbiter analyze /path/to/repo

# Agent leaderboard -- who writes the best code?
arbiter agents

# Start the dashboard (single HTML file, no build step)
arbiter serve --port 8080

What It Scores

Arbiter wraps tools you already trust and combines them into a deterministic composite score:

Analyzer Tool Weight What It Finds
Lint ruff 35% Style violations, import errors, bugbear patterns
Security bandit 30% Hardcoded secrets, shell injection, dangerous patterns
Complexity radon 35% Cyclomatic complexity (grade A-F per function)
Dead Code vulture penalty Unused functions, imports, variables
Duplication AST hash penalty Near-duplicate function bodies
Semgrep semgrep opt-in Custom rule enforcement (enable via config)

Scoring: 100 - (penalty / LOC) * normalization. Grades: A (90+) | B (80+) | C (70+) | D (60+) | F (<60).

What Makes Arbiter Different

Feature Traditional Tools Arbiter
Agent attribution None First-class: tracks Claude, Codex, Gemini, Copilot, humans
Per-commit scoring Repo-wide only Scores each commit's changed files individually
Diff analysis N/A Score only what changed in a PR/branch
Agent-specific gates N/A Different quality thresholds per agent trust tier
Dashboard SaaS login Single HTML file with per-agent timelines and fleet view
Dependencies Heavy Analysis tools only; core is stdlib Python

CLI Reference

arbiter analyze <repo>                     # Full analysis + per-commit scoring + persist
arbiter score <repo> [--json] [--exclude]  # Quick score (no persist)
arbiter diff <repo> [--base main] [--json] # Score changed files vs base branch
arbiter agents                             # Agent leaderboard
arbiter trend [--days 30]                  # Quality trend
arbiter worst [--limit 20]                 # Worst files
arbiter commits [--agent claude]           # Recent commits with scores
arbiter audit-fleet <directory>            # Audit all repos in a directory
arbiter triage                             # Auto-classify repos: green/yellow/red/archive
arbiter fix <repo> [--dry-run]             # Auto-fix ruff findings + before/after score
arbiter serve [--port 8080]                # API + dashboard

Tests

pip install ".[test]"
PYTHONPATH=src python -m pytest tests/ -v    # 78 tests, <7 seconds

Quality Gate

Arbiter grades itself on every push and PR. The CI runs arbiter score . and fails if the score drops below 90 (A grade).

# Run the same check locally
arbiter score . --fail-under 90

# Score only your changed files against main
arbiter diff . --base main --fail-under 80

Requirements

  • Python 3.11+
  • git (for historian)
  • Optional: ruff, radon, vulture, bandit (install via [analyzers] extra)

HUMMBL Ecosystem

Part of the HUMMBL cognitive AI architecture:

  • hummbl-governance -- Governance primitives that Arbiter scores against
  • base120 -- 120 mental models for structured reasoning
  • mcp-server -- MCP server for AI agent integration

Learn more at hummbl.io.

License

Apache 2.0 -- see LICENSE.


Built by HUMMBL LLC from production experience coordinating Claude, Codex, Gemini, and human engineers on a 14,000+ test codebase.

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

arbiter_score-0.6.0.tar.gz (171.3 kB view details)

Uploaded Source

Built Distribution

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

arbiter_score-0.6.0-py3-none-any.whl (129.6 kB view details)

Uploaded Python 3

File details

Details for the file arbiter_score-0.6.0.tar.gz.

File metadata

  • Download URL: arbiter_score-0.6.0.tar.gz
  • Upload date:
  • Size: 171.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for arbiter_score-0.6.0.tar.gz
Algorithm Hash digest
SHA256 62a4e42d422a9d8d0acb06fd6c7daa366b856c40401b7b862498c4334f8a168b
MD5 1d86827c9d1d6fcb88822d627ea39801
BLAKE2b-256 36214817fb4b0150f596e0d35d251961991f3a1336ef750f70857e0ff04466bf

See more details on using hashes here.

File details

Details for the file arbiter_score-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: arbiter_score-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 129.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for arbiter_score-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1e77b1c63c497c7c1b10e4a7b5a97e6900dcdce07ad66b73df3c10d9577694f3
MD5 56fb3a8ad3f882e8e7f0e54674401ff6
BLAKE2b-256 776bbaead6ec34c26741e777fc6e0c03049314f0afcec717eefac588a068e357

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