Audit multivariate metric drift
Detect material distribution shifts with reference-fixed quantile bins, PSI, Jensen-Shannon divergence, standardized Wasserstein distance, permutation tests, and FDR control.
What it's for
Detects when the data underneath a dashboard has shifted enough to invalidate comparisons — across many metrics at once, with false-discovery control.
Audits whether engineering metrics changed distribution or data regime before an agent treats a shifted mean as an operational fact.
What you give it
Every tool is a pure function: it computes from what you pass it and reads nothing on its own. Inputs split into evidence you supply from your connected systems, calibration your team owns, and numerical controls that affect precision but never the result's meaning.
| Field | Type | Role | Required |
|---|---|---|---|
| current_rows | array of objects (2 fields) ≥ 50 items | Evidence | Yes |
| false_discovery_rate | number ≥ 0.001, ≤ 0.2 | Your calibration | Optional |
| max_detail_rows | integer ≥ 1, ≤ 50 | Numerical control | Optional |
| metric_names | array of string ≥ 1 item | Evidence | Yes |
| minimum_psi | number ≥ 0, ≤ 10 | Your calibration | Optional |
| permutation_draws | integer ≥ 200, ≤ 20000 | Numerical control | Optional |
| quantile_bins | integer ≥ 2, ≤ 50 | Your calibration | Optional |
| reference_rows | array of objects (2 fields) ≥ 50 items | Evidence | Yes |
| seed | integer | Numerical control | Optional |
Each current_rows
record
| Field | Type | Required |
|---|---|---|
| id | string (non-empty) | Yes |
| metrics | object | Yes |
{
"current_rows": [
{
"id": "current-0",
"metrics": {
"cycle_time": 0.8,
"failure_rate": 0,
"review_time": 0
}
},
{
"id": "current-1",
"metrics": {
"cycle_time": 0.9,
"failure_rate": 0.01,
"review_time": 0.1
}
},
{
"id": "current-2",
"metrics": {
"cycle_time": 1,
"failure_rate": 0.02,
"review_time": 0.2
}
},
{
"id": "current-3",
"metrics": {
"cycle_time": 1.1,
"failure_rate": 0.03,
"review_time": 0.3
}
},
{
"id": "current-4",
"metrics": {
"cycle_time": 1.2000000000000002,
"failure_rate": 0.04,
"review_time": 0.4
}
},
{
"id": "current-5", Truncated for display — the full payload is 1613 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.
{
"assumptions": [
"Reference and current rows are independent representative samples from comparable entity definitions and measurement pipelines.",
"Reference quantile bins are fixed before current observations are inspected; changing bins after drift appears invalidates the permutation interpretation.",
"Benjamini-Hochberg controls multiplicity across the declared metrics while the PSI floor requires practical as well as statistical drift.",
"Distribution drift is a data or operating-regime diagnostic, not evidence of causality, misconduct, or individual performance change."
],
"decision": "material_distribution_drift_detected",
"drifted_metrics": [
"cycle_time"
],
"method": "fixed_reference_psi_js_permutation_fdr_drift_v1",
"metrics": [
{
"current_mean": 1.75,
"fdr_discovery": true,
"jensen_shannon_divergence": 0.17443,
"material_drift": true,
"metric": "cycle_time",
"permutation_p_value": 0.004975,
"population_stability_index": 1.758141,
"reference_bin_count": 10,
"reference_mean": 0.95,
"standardized_wasserstein_distance": 1.136
},
{
"current_mean": 0.0495,
"fdr_discovery": false,
"jensen_shannon_divergence": 0,
"material_drift": false,
"metric": "failure_rate",
"permutation_p_value": 1,
"population_stability_index": 0,
"reference_bin_count": 10,
"reference_mean": 0.0495,
"standardized_wasserstein_distance": 0
},
{
"current_mean": 0.785,
"fdr_discovery": false,
"jensen_shannon_divergence": 0,
"material_drift": false,
"metric": "review_time",
"permutation_p_value": 1, Truncated for display — the full payload is 61 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 Detect material distribution shifts with reference-fixed quantile bins, PSI, Jensen-Shannon divergence, standardized Wasserstein distance, permutation tests, and FDR control.
- 2 Evaluate the method-specific diagnostics and gates returned by the function, then abstain unless the declared decision clears them under locally governed thresholds.
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.
- Association, instability, or measurement quality is not a causal effect and must not be converted directly into an individual employment decision.
Minimum evidence
- reference_rows: at least 50 rows/items
- current_rows: at least 50 rows/items
- metric_names: at least 1 rows/items
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
- stable comparable metric projection and window labels
- metric catalog
- reference/current windows
- practical PSI threshold
Calibration workflow
- 1 Define the management decision, target outcome, aggregate unit, privacy boundary, cadence, and prediction/intervention horizon for this organization.
- 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 Estimate statistical parameters on training history, but obtain costs, utilities, risk tolerance, practical-effect thresholds, capacity, and policy constraints from accountable decision owners.
- 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 Deploy only if the returned decision clears evidence, overlap, calibration, robustness, and guardrail checks; warning, unsupported, schema-gap, and fallback decisions are abstentions.
- 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 20 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 material distribution shifts with referencefixed" }
→ finds "audit_multivariate_metric_drift"
gitrevio_capability_describe
{ "capability_id": "audit_multivariate_metric_drift" }
→ returns the input schema and agent guidance shown on this page
gitrevio_capability_run
{ "capability_id": "audit_multivariate_metric_drift", "arguments": { ... } }
→ returns the result shown above Works in Claude Desktop, Claude Code, Cursor, Cline, Continue.dev, Goose and Aider. See the MCP server.