Skip to content
shashank03-devPublic

About

Local, launcher-agnostic accountability + coordination layer under Claude Code and Codex: attribution/cost, collision locks (MCP), review triage, cross-model verify.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

proveno

A local, launcher-agnostic accountability + coordination layer that sits under your coding agents (Claude Code, Codex, and other CLI agents) — not another agent launcher. It answers four questions no existing tool owns when a team runs multiple agents in parallel:

  1. Attribution + cost — which agent/model/prompt touched each file, and what it cost.
  2. Collision — stop two agents silently editing the same file at the same time.
  3. Review triage — which changed files deserve human review first.
  4. Cross-model verification — before merge, have the other model review the diff.

Everything is local. Events live in a gitignored SQLite db at <repo>/.proveno/events.db.

Two honesty invariants

proveno is deliberately careful about what it claims:

  • Cost is an estimate (~est). Token spend is allocated, never billed. It is always labeled ~est. Attribution (which agent/model/prompt) is exact — read from the real transcripts and hook payloads.
  • Pricing is real, dated, and never from memory. config/models.json ships a dated price snapshot labeled "verify before trust". Unknown models are marked unpriced, never guessed.

Install & wire up

npm i -g proveno               # or: brew install shashank03-dev/proveno/proveno
proveno init                   # idempotent; wires git + Claude Code + Codex hooks
proveno doctor                 # confirm capture is actually landing events

Prefer to run from source (or hack on it)? prepare builds dist/ on install, and npm link puts the proveno command on your PATH:

git clone https://github.com/shashank03-dev/proveno.git
cd proveno
npm install
npm link                       # then `proveno …` works; or use `node dist/cli.js …`
proveno init

init merges hooks into ~/.claude/settings.json and ~/.codex/config.toml, installs a chained post-commit git hook, and adds .proveno/ to .gitignore. It backs up every file it touches and restores them byte-for-byte on init --uninstall.

init verifies itself. The hooks it installs must invoke a command that actually resolves. If proveno isn't on your PATH, init writes an absolute <node> <path>/dist/cli.js instead, then runs that command and reports the result:

  hook command       /usr/bin/node /path/to/proveno/dist/cli.js
                     resolved via absolute path (proveno not on PATH)
  command check      OK (0.1.0)

If the check fails, init says INSTALLED BUT NOT WORKING and tells you how to fix it — it will not claim capture is wired when it isn't. (Capture hooks are deliberately silent so they can never break your edit or commit flow, which means a broken hook command would otherwise fail invisibly and capture nothing.)

Codex requires one manual step: Codex trusts command hooks by hash via its /hooks command — a security control that cannot be automated. Run /hooks inside Codex once and approve the proveno hooks. init prints this reminder.

The four features

1. Attribution + cost

node dist/cli.js cost --by model      # spend rollup (agent | model | session | day)
node dist/cli.js blame src/pay.ts     # which agent/model/prompt touched a file, with ~est cost

Two sources feed this, and they carry different information:

Source Gives you Cost?
Hooks (real-time, via init) which agent edited which file, immediately no — hook payloads carry no token usage
Transcripts (read on demand) token usage per turn, model, prompt text yes

So a file edited seconds ago shows its agent right away but reports (unknown) model and unpriced until the session's transcript is read — cost counts only turn events, which exist solely in transcripts. This is expected, not a bug: attribution is exact the moment it lands, and cost fills in once the token counts are actually available.

2. Collision guard (MCP)

proveno runs a small MCP server that agents connect to. Each agent's process gets its own session; all sessions share the repo's SQLite locks table, so a lock taken by one agent is seen by the other. Locks are TTL-based — a crashed agent never wedges a file.

node dist/cli.js mcp --agent claude-code   # started per-agent (init wires this)
node dist/cli.js lock ls                    # list live locks
node dist/cli.js lock rm src/pay.ts         # force-clear a stuck lock

MCP tools: proveno_lock_acquire(file), proveno_lock_release(file), proveno_lock_status(). A second agent's acquire on a held file is denied with the holder's identity and expiry, plus a suggestion to coordinate, edit elsewhere, or wait.

3. Review triage

node dist/cli.js triage --staged          # rank staged changes by review risk
node dist/cli.js triage --range main..HEAD

Ranks changed files by weighted signals (security-sensitive paths, diff size, missing tests, churn, multi-agent diversity). Weights live in config/triage.json.

4. Cross-model verification (merge gate)

node dist/cli.js verify --staged          # the OTHER model reviews the diff
node dist/cli.js verify --history         # past verdicts (audit trail)

proveno reads the author model from captured events and routes the diff to the opposite model's CLI — Codex reviews Claude's work, Claude reviews Codex's. The reviewer returns a structured verdict {verdict: block|warn|pass, reasons, risky_hunks}, persisted to the verifications table.

  • block → exit 2 (so it can gate a hook); warn/pass → exit 0.
  • Honest failure modes: if the reviewer CLI is missing, or runs but returns no parseable verdict, proveno reports SKIP (unverified — not a pass) and exits 0. It never fabricates a pass.
  • Author model unknown (no captured edits)? Pass --reviewer codex|claude explicitly.

Also available as the MCP tool proveno_verify(diff?, reviewer?).

Optional: wire verify as a pre-push gate

Because verify exits non-zero only on a block verdict, it drops cleanly into a pre-push hook. This is opt-in — add it yourself when you want the gate:

cat > "$(git rev-parse --git-path hooks)/pre-push" <<'EOF'
#!/bin/sh
# proveno cross-model merge gate: block the push if the other model blocks the diff.
node "$(git rev-parse --show-toplevel)/dist/cli.js" verify --range @{push}..HEAD || exit 1
EOF
chmod +x "$(git rev-parse --git-path hooks)/pre-push"

Behavior at the gate:

  • block → verify exits 2 → the push is aborted.
  • warn / pass → exit 0 → the push proceeds.
  • skip (reviewer missing or unparseable output) → exit 0 → the push proceeds unverified. The gate never blocks on a skip and never turns a skip into a pass — the run is recorded as SKIP in verify --history so the gap is visible.

To review only what you're about to push, scope with a range (e.g. --range @{push}..HEAD or --range origin/main..HEAD). Use --staged in a pre-commit hook instead if you'd rather gate at commit time.

Health check

proveno doctor reports whether capture is wired and landing events — DB presence and event count, the git/Claude Code/Codex hook install points, and the pricing-snapshot age. It exits non-zero when no capture path is wired (i.e. init hasn't run), so it drops into CI or a shell prompt.

Development

npm run typecheck
npm run lint         # biome
npm test             # vitest
npm run build
npm run check:pricing   # flag a stale config/models.json snapshot
bash scripts/e2e.sh     # full end-to-end run in an isolated HOME (never touches your config)

CI (.github/workflows/ci.yml) runs typecheck + lint + tests on a Linux/macOS × Node 20/22 matrix. Releases are cut by release-please (.github/workflows/release.yml): conventional commits drive a release PR; merging it tags a version and publishes to npm (needs an NPM_TOKEN repo secret).

About

Local, launcher-agnostic accountability + coordination layer under Claude Code and Codex: attribution/cost, collision locks (MCP), review triage, cross-model verify.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages