Audit KPI threshold bunching

Detect a post-target excess concentration immediately above a governed KPI threshold: compare within-unit pre/post local mass and above-versus-below mirror asymmetry, bootstrap whole units, report density bins and a smoothed log-density jump, and explicitly refuse to equate bunching with individual gaming or intent.

What it's for

Extends Gitrevio's Goodhart protection from proxy drift and incentive design into a live post-target diagnostic that exposes suspicious threshold mass without accusing people or pretending the pattern proves manipulation.

What you give it

Inputs split into evidence read from your connected systems, calibration your team owns, and numerical controls that affect precision but never the result's meaning.

Field Type Role Required
bandwidth number > 0 Your calibration Yes
bootstrap_draws integer ≥ 500, ≤ 20000 Numerical control Optional
confidence_level number ≥ 0.8, ≤ 0.99 Your calibration Optional
max_detail_rows integer ≥ 1, ≤ 500 Numerical control Optional
minimum_excess_mass_share number ≥ 0, ≤ 1 Your calibration Optional
minimum_mirror_shift number ≥ 0, ≤ 2 Your calibration Optional
observations array of objects (5 fields) ≥ 400 items Evidence Yes
seed integer Numerical control Optional
threshold number Your calibration Yes

Each observations record

Field Type Required
epoch one of "pre_target", "post_target" Yes
id string (non-empty) Yes
metric_value number Yes
unit_id string (non-empty) Yes
weight number (> 0) Optional
Example input
{
  "bandwidth": 10,
  "bootstrap_draws": 500,
  "minimum_excess_mass_share": 0.1,
  "minimum_mirror_shift": 0.2,
  "observations": [
    {
      "epoch": "pre_target",
      "id": "kpi-0-pre_target-0",
      "metric_value": 85,
      "unit_id": "unit-0"
    },
    {
      "epoch": "pre_target",
      "id": "kpi-0-pre_target-1",
      "metric_value": 95,
      "unit_id": "unit-0"
    },
    {
      "epoch": "pre_target",
      "id": "kpi-0-pre_target-2",
      "metric_value": 105,
      "unit_id": "unit-0"
    },
    {
      "epoch": "pre_target",
      "id": "kpi-0-pre_target-3",
      "metric_value": 115,
      "unit_id": "unit-0"
    },
    {
      "epoch": "pre_target",
      "id": "kpi-0-pre_target-4",
      "metric_value": 85,
      "unit_id": "unit-0"
    },
    {
      "epoch": "pre_target",
      "id": "kpi-0-pre_target-5",
      "metric_value": 95,
      "unit_id": "unit-0"
    },
    {
      "epoch": "pre_target",

Truncated for display — the full payload is 4810 lines.

What you get back

This is the actual output of running the example above — computed by the same function the platform calls, not an illustration.

Example output
{
  "assumptions": [
    "The threshold, activation epoch, bandwidth, unit, metric version, and eligible observation process were fixed independently of the observed post-target density.",
    "Absent the target, local metric density would have evolved smoothly enough that pre/post within-unit changes provide a useful counterfactual.",
    "The unit bootstrap reflects dependence; missing observations, rounding, censoring, and mechanical caps are not differentially concentrated at the target."
  ],
  "decision": "post_target_threshold_bunching_detected",
  "executive_summary": {
    "above_threshold_excess_mass_interval": [
      0.35,
      0.35
    ],
    "above_threshold_excess_mass_share": 0.35,
    "bunching_detected": true,
    "log_density_jump_change": 1.7814,
    "mirror_asymmetry_interval": [
      0.7143,
      0.7143
    ],
    "mirror_asymmetry_shift": 0.7143
  },
  "limitations": [
    "Bunching is a distributional anomaly, not proof of gaming, intent, fraud, or poor individual performance.",
    "Legitimate process improvement, reporting changes, seasonality, or a mechanical metric rule can create the same signature.",
    "The audit is local to the governed threshold and bandwidth and can miss diffuse manipulation away from the cutoff."
  ],
  "local_density": [
    {
      "bins": {
        "inner_above": 0.25,
        "inner_below": 0.25,
        "outer_above": 0.25,
        "outer_below": 0.25
      },
      "epoch": "pre_target",
      "local_row_fraction": 1,
      "local_weight": 400,
      "log_inner_above_below_density_ratio": 0
    },
    {
      "bins": {
        "inner_above": 0.6,
        "inner_below": 0.1,
        "outer_above": 0.15,

Truncated for display — the full payload is 162 lines.

How it works

Statistical audit & measurement — Check whether a number is fit to decide on: coverage, timing, reconciliation, and the gaps a dashboard hides.

  1. 1 Freeze the KPI version, target threshold, activation epoch, bandwidth, eligible observation process, unit of dependence, and any weights before examining post-target density.
  2. 2 Within each unit and epoch, restrict to two bandwidths around the threshold and calculate the share immediately above the threshold plus inner-above versus inner-below mirror asymmetry; require paired local support for every unit.
  3. 3 Subtract each unit's pre-target local measures from its post-target measures, resample whole units for uncertainty, and corroborate excess mass with the change in a Jeffreys-smoothed inner-above/below log-density ratio.
  4. 4 Flag bunching only when both excess mass and mirror displacement clear prespecified practical and directional-support gates; return local-density bins so reporting caps, rounding, and legitimate process shifts can be investigated.

Before you trust it

Every tool in the catalog ships with the conditions under which its answer is meaningful — and the conditions under which it should abstain instead of guessing.

Assumptions & guardrails

  • Metric definitions, weights, aggregate grain, sampling, missingness, dependence, and comparison windows correspond to the management claim being audited.
  • Without KPI activation, local density near the threshold would have evolved smoothly enough for within-unit pre/post change to be informative, and no coincident eligibility or reporting rule selectively changed at the cutoff.
  • Metric values preserve the historically displayed precision and version; missingness, top/bottom coding, mechanical caps, batch boundaries, and rounding do not create artificial heaps.
  • The unit is the correct assignment and dependence level, every unit has sufficient observations in both epochs, and the bandwidth was not selected after seeing the anomaly.
  • Association, instability, or measurement quality is not a causal effect and must not be converted directly into an individual employment decision.
  • Bunching is a distributional anomaly, not proof of gaming, fraud, intent, low performance, or misconduct by any person or team.
  • Legitimate improvement, seasonality, selection, reporting changes, metric rounding, or a mechanical rule can generate the same local density signature.
  • Use the result to inspect metric design and data provenance at an aggregate level; never as an automatic employment, compensation, or security decision.

Minimum evidence

  • observations: at least 400 rows/items
  • threshold: required and organization-defined
  • bandwidth: required and organization-defined

How to validate it

Validate on future periods or held-out aggregate units, compare with a simple baseline, and require stability across plausible metric definitions and decision thresholds.

Calibrating it to your org

Same for everyone

The mathematical kernel, validation rules, method version, and JSON output semantics are organization-independent; no tenant-trained coefficients or company benchmark is embedded in the function.

Specific to you

  • a null-preserving pre/post target observation panel retaining the historically displayed metric precision
  • local support counts within two prespecified bandwidths around the governed threshold
  • KPI and target versions, threshold, activation time, unit, eligibility, metric precision, zero/missingness policy, weights, bandwidth, local support, material shifts, and placebo plan

Calibration workflow

  1. 1 Define the management decision, target outcome, aggregate unit, privacy boundary, cadence, and prediction/intervention horizon for this organization.
  2. 2 Build a tenant-scoped historical cohort using only information available before each prediction or decision; preserve zero periods, censoring, assignment probabilities, and unresolved outcomes when the method requires them.
  3. 3 Estimate statistical parameters on training history, but obtain costs, utilities, risk tolerance, practical-effect thresholds, capacity, and policy constraints from accountable decision owners.
  4. 4 Validate on later time windows or held-out aggregate units at the deployment grain, against a simple baseline and the function-specific validation strategy.
  5. 5 Deploy only if the returned decision clears evidence, overlap, calibration, robustness, and guardrail checks; warning, unsupported, schema-gap, and fallback decisions are abstentions.
  6. 6 Monitor realized outcomes, data drift, coverage, and decision regret; recalibrate at a governed cadence or after a detected regime/definition change, never merely because a stakeholder dislikes the result.

Call it from your AI

You don't wire up 388 tools in your MCP client. The GitRevio MCP server exposes 18 tools, three of which let an agent search the catalog, read a tool's schema, and run it — so the assistant finds this one on its own.

gitrevio_capabilities_search
  { "q": "detect a posttarget excess concentration immediately" }
  → finds "audit_kpi_threshold_bunching"

gitrevio_capability_describe
  { "capability_id": "audit_kpi_threshold_bunching" }
  → returns the input schema and agent guidance shown on this page

gitrevio_capability_run
  { "capability_id": "audit_kpi_threshold_bunching", "arguments": { ... } }
  → returns the result shown above

Works in Claude Desktop, Claude Code, Cursor, Cline, Continue.dev, Goose and Aider. See the MCP server.

Related tools

Forecast correlated milestone slippage

Forecast joint portfolio milestone slippage from complete historical episode-by-category planned/actual duration ratios: fit log-error marginals and a positive-definite shrinkage Gaussian copula, mix shared and idiosyncratic shocks, propagate durations through the current dependency DAG, and report joint confidence, finish distributions, and tail value at risk.

Forecasting & survival

Solve robust policy across causal models

Choose an aggregate policy across competing interventional causal models and a bounded posterior credal set: derive model-by-action expected utility from outcome probabilities, compute exact lower/upper utility and adversarial model weights, minimize worst-case regret, expose model disagreement and value of perfect model information, and fail closed when any causal evidence gate fails.

Causal inference & experiment design

Audit commercial technical commitment integrity

Audit signed commercial promises against explicitly allocated technical scope, dependency order, funded capacity, acceptance criteria and evidence; expose orphan scope, double allocation, cycles, late plans and maximum contractual penalty without interpreting legal rights from engineering activity.

Constrained optimization

Audit decision execution fidelity

Audit whether approved decisions actually became verified implementation at the promised aggregate-unit and component grain, with whole-unit bootstrap uncertainty and simultaneous gates for fidelity, overdue scope, unverifiable evidence, exceptions and critical gaps.

Statistical audit & measurement

Audit release risk prediction integrity

Audit a complete eligible-change release-risk cohort for point-in-time prediction lineage, exact change-to-deployment linkage, mature mutually exclusive outcomes, selective labels, score-triggered intervention contamination, calibration and false alarms before the score influences a release decision.

Forecasting & survival

Audit sunk cost escalation

Audit whether cumulative sunk cost predicts aggregate project continuation after project fixed effects, checkpoint time, forward value, success probability, remaining cost, and future irreversibility, with project-cluster bootstrap uncertainty.

Statistical audit & measurement

See every tool in Delivery forecasting & commitments →

Ready to See Your Engineering work clearly?

Request a free demo