Calculator
Compute the cost of trusted work
Two calculators, one discipline. For development, compute cost per accepted change — the cost of producing software that stayed in production. For agents, compute cost per accepted action — the cost of agent work that stayed accepted. Both run entirely in your browser; nothing is sent to a server.
Cost per accepted change — for one measurement window (a sprint, a month, a quarter).
Cost per accepted action — for a window of agent operation. What this measures →
Use the library
Both calculators are pure TypeScript functions — import them into your dashboards, FinOps pipelines, or CI jobs:
import { costPerAcceptedChange, costPerAcceptedAction } from 'cost-per-accepted-change';
// Development: software that stayed in production
costPerAcceptedChange({ modelCost: 1200, infraCost: 400, engineeringTime: 18000,
reviewCost: 6000, reworkCost: 2400, acceptedChanges: 42 }).value; // 666.67
// Agents: actions that stayed accepted (failureImpactCost = escalations,
// refunds, lost sales — the downstream consequence of actions that failed)
costPerAcceptedAction({ inferenceCost: 3000, toolCost: 1200, infraCost: 800,
oversightCost: 9000, remediationCost: 4000, failedRunCost: 1000,
failureImpactCost: 12000, acceptedActions: 5000 }).value; // 6.2
Source: github.com/brennhill/cost-per-accepted-change. MIT-licensed.
Use the CLI
For one-shot calculations and full repo audits, install the CLI. cpac audit walks a GitHub repo over a date window, detects reverts, applies the 500-LOC normalization, and emits the accepted-change-unit count:
# Pure math
npx cost-per-accepted-change-cli cpac calc \
--modelCost 1200 --infraCost 400 --engineeringTime 18000 \
--reviewCost 6000 --reworkCost 2400 --acceptedChanges 42
# Audit a real repo window for the denominator
npx cost-per-accepted-change-cli cpac audit \
--repo owner/name --since 2026-04-01 --until 2026-04-30
Requires the GitHub CLI on your PATH and an authenticated session.
Use the MCP server
The same core is exposed as an MCP stdio server (cpac-mcp) so AI agents in Claude Code, Cursor, and other MCP-aware clients can compute the metric inside a conversation:
// Add to your MCP client configuration
{
"mcpServers": {
"cpac": {
"command": "npx",
"args": ["-y", "cost-per-accepted-change-cli", "cpac-mcp"]
}
}
}
The skill manifest is published at /.well-known/agent-skills/cost-per-accepted-change.md and indexed at /.well-known/agent-skills/index.json. Source: tools/cpac-cli.