Audit metric regime stability

Detect practical structural breaks across aggregate metric histories with recursive max-CUSUM search, moving-block null resampling, and familywise false-alarm control, then identify the defensible baseline regime.

What it's for

Stops an agent from benchmarking today's organization against a historical operating regime that instrumentation, topology, policy, or demand has made incomparable.

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
block_length integer ≥ 1, ≤ 100 Your calibration Optional
familywise_false_alarm_probability number ≥ 0.001, ≤ 0.2 Your calibration Optional
max_detail_rows integer ≥ 1, ≤ 500 Numerical control Optional
maximum_change_points integer ≥ 1, ≤ 20 Your calibration Optional
metric_names array of string ≥ 1 item Evidence Yes
minimum_segment_periods integer ≥ 6, ≤ 1000 Your calibration Optional
minimum_standardized_shift number ≥ 0.05, ≤ 5 Your calibration Optional
observations array of objects (3 fields) ≥ 40 items Evidence Yes
permutation_draws integer ≥ 200, ≤ 20000 Numerical control Optional
seed integer Numerical control Optional

Each observations record

Field Type Required
id string (non-empty) Yes
metrics object Yes
period integer Yes
Example input
{
  "metric_names": [
    "cycle_time",
    "failure_rate"
  ],
  "observations": [
    {
      "id": "regime-example-0",
      "metrics": {
        "cycle_time": 0,
        "failure_rate": 0
      },
      "period": 0
    },
    {
      "id": "regime-example-1",
      "metrics": {
        "cycle_time": 0.12,
        "failure_rate": 0.1
      },
      "period": 1
    },
    {
      "id": "regime-example-2",
      "metrics": {
        "cycle_time": 0.02,
        "failure_rate": 0.07
      },
      "period": 2
    },
    {
      "id": "regime-example-3",
      "metrics": {
        "cycle_time": 0.14,
        "failure_rate": 0.04
      },
      "period": 3
    },
    {
      "id": "regime-example-4",
      "metrics": {
        "cycle_time": 0.04,
        "failure_rate": 0.01
      },

Truncated for display — the full payload is 970 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
{
  "baseline_reuse": "use_latest_regime_only",
  "change_point_count": 1,
  "change_points": [
    {
      "after_mean": 1.603,
      "before_mean": 0.097,
      "familywise_p_value": 0.0249,
      "max_statistic": 128.9404,
      "metric": "cycle_time",
      "period": 60,
      "segment_end_period": 119,
      "segment_max_p_value": 0.005,
      "segment_start_period": 0,
      "standardized_shift": 23.5412
    }
  ],
  "configuration": {
    "block_length": 4,
    "familywise_false_alarm_probability": 0.05,
    "minimum_segment_periods": 12,
    "minimum_standardized_shift": 0.5,
    "permutation_draws": 200
  },
  "decision": "metric_regime_change_detected",
  "interpretation": "A detected break invalidates automatic reuse of older baseline periods; it does not identify the cause of the regime change.",
  "latest_regime": {
    "metrics": [
      {
        "mean": 1.603,
        "metric": "cycle_time",
        "standard_deviation": 0.064
      },
      {
        "mean": 0.0602,
        "metric": "failure_rate",
        "standard_deviation": 0.038
      }
    ],
    "periods": 60,
    "start_period": 60
  },
  "method": "moving_block_max_cusum_regime_stability_audit_v1",
  "sample": {

Truncated for display — the full payload is 50 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 Detect practical structural breaks across aggregate metric histories with recursive max-CUSUM search, moving-block null resampling, and familywise false-alarm control, then identify the defensible baseline regime.
  2. 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

  • observations: at least 40 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

  • one complete aggregate metric vector per declared cadence
  • zero-event periods preserved rather than omitted
  • historical epoch and metric family
  • minimum stable regime length and practical standardized shift
  • serial-dependence block length and familywise false-alarm policy

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 practical structural breaks across aggregate" }
  → finds "audit_metric_regime_stability"

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

gitrevio_capability_run
  { "capability_id": "audit_metric_regime_stability", "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

Infer stability selected temporal metric graph

Infer a compact aggregate temporal dependency graph with a chronologically held-out ridge VAR, moving-block coefficient bootstrap, practical-effect stability selection, and false-discovery control.

Network & dependency analysis

Optimize deadline recovery plan

Choose a budget-feasible deadline recovery plan over a dependency DAG using correlated triangular task durations, uncertain acceleration effects, common random numbers, probability-gain-per-cost search, and backward pruning.

Constrained optimization

Aggregate risk register copula

Aggregate risk-register occurrence and lognormal severity marginals through a validated Gaussian copula into expected loss, VaR, CVaR, dependence amplification, and tail shares.

Statistical audit & measurement

Allocate restless bandit interventions

Allocate scarce recurring interventions across evolving Markov units with Whittle indices, explicit indexability checks, and paired policy simulation.

Sequential Bayesian & bandits

Attribute commercial dependency tail loss

Calculate expected loss, VaR and CVaR for commercial value concentrated in shared technical components, then allocate every modeled tail-loss dollar exactly once across components with normalized negative-log survival hazard rather than overlapping leave-one-out sensitivities.

Forecasting & survival

Audit commercial resilience claim integrity

Audit resilience ROI claims against a unique commercial-source to technical-component graph: recompute each action's avoided loss under joint failure scenarios, cap support at graph-derived value, detect duplicate effects, probability drift and weak evidence, and prevent overlapping component benefits from being sold twice.

Network & dependency analysis

See every tool in Risk, tails & resilience →

Ready to See Your Engineering work clearly?

Request a free demo