Design balanced stepped wedge rollout

Assign teams or other aggregate clusters to capacity-constrained rollout waves with pair-exchange optimization of cumulative causal balance, represented population, and rollout risk.

What it's for

Turns a phased deployment into a practical, balanced experiment plan instead of letting operational convenience silently determine the causal comparison.

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
clusters array of objects (4 fields) ≥ 20 items Evidence Yes
max_detail_rows integer ≥ 1, ≤ 10000 Numerical control Optional
maximum_standardized_imbalance number ≥ 0.01, ≤ 2 Your calibration Optional
metric_names array of string ≥ 1 item Evidence Yes
optimization_iterations integer ≥ 100, ≤ 50000 Numerical control Optional
risk_balance_weight number ≥ 0, ≤ 100 Your calibration Optional
seed integer Numerical control Optional
size_balance_weight number ≥ 0, ≤ 100 Your calibration Optional
wave_capacities array of integer ≥ 2 items Evidence Optional
wave_count integer ≥ 2, ≤ 20 Your calibration Optional

Each clusters record

Field Type Required
baseline_metrics object Yes
cluster_size number (≥ 1) Optional
id string (non-empty) Yes
rollout_risk number (≥ 0, ≤ 1) Optional
Example input
{
  "clusters": [
    {
      "baseline_metrics": {
        "cycle_time": 0,
        "failure_rate": 0,
        "throughput": 0
      },
      "cluster_size": 8,
      "id": "rollout-design-0",
      "rollout_risk": 0
    },
    {
      "baseline_metrics": {
        "cycle_time": 1.85,
        "failure_rate": 0.17525773195876287,
        "throughput": 2.9
      },
      "cluster_size": 9,
      "id": "rollout-design-1",
      "rollout_risk": 0.13
    },
    {
      "baseline_metrics": {
        "cycle_time": 3.7,
        "failure_rate": 0.35051546391752575,
        "throughput": 5.8
      },
      "cluster_size": 10,
      "id": "rollout-design-2",
      "rollout_risk": 0.26
    },
    {
      "baseline_metrics": {
        "cycle_time": 0.5,
        "failure_rate": 0.5257731958762887,
        "throughput": 8.7
      },
      "cluster_size": 11,
      "id": "rollout-design-3",
      "rollout_risk": 0.39
    },
    {
      "baseline_metrics": {

Truncated for display — the full payload is 412 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": [
    "Every cluster is eligible for every declared wave, adoption is irreversible after its assigned wave, and capacities are fixed before optimization.",
    "Baseline metrics, cluster sizes, and rollout-risk scores are frozen before assignment; the design balances declared features but cannot balance omitted causes.",
    "The pair-exchange heuristic preserves exact wave counts and reports its remaining imbalance; it does not claim a global optimum.",
    "Production inference still needs randomized execution, assignment logging, no anticipatory treatment, stable outcomes, interference policy, and cohort-aware analysis."
  ],
  "balance": {
    "initial_objective": 0.0788,
    "maximum_allowed": 0.25,
    "maximum_cumulative_standardized_imbalance": 0.0855,
    "optimized_objective": 0.0041,
    "relative_improvement": 0.9478,
    "represented_population_cv_across_waves": 0.0308,
    "risk_weighted_population_cv_across_waves": 0.0623
  },
  "computation": {
    "accepted_improving_swaps": 15,
    "optimization_iterations": 500,
    "seed": 26
  },
  "decision": "balanced_stepped_wedge_design_ready",
  "detail": {
    "returned_rows": 40,
    "total_rows": 40,
    "truncated": false
  },
  "method": "capacity_constrained_stepped_wedge_pair_exchange_v1",
  "sample": {
    "clusters": 40,
    "metrics": 3,
    "represented_population": 400,
    "waves": 4
  },
  "schedule": [
    {
      "cluster_id": "rollout-design-12",
      "cluster_size": 10,
      "rollout_risk": 0.73,
      "rollout_wave": 1
    },
    {
      "cluster_id": "rollout-design-19",
      "cluster_size": 12,

Truncated for display — the full payload is 303 lines.

How it works

Causal inference & experiment design — Separate what a change caused from what merely moved alongside it.

  1. 1 Assign teams or other aggregate clusters to capacity-constrained rollout waves with pair-exchange optimization of cumulative causal balance, represented population, and rollout risk.
  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

  • Assignment or adoption timing, interference policy, overlap, attrition, and outcome availability match the estimand encoded by the method.
  • A causal label is warranted only when design and diagnostic requirements pass; otherwise treat the result as descriptive or abstain.

Minimum evidence

  • clusters: at least 20 rows/items
  • metric_names: at least 1 rows/items

How to validate it

Preserve the assignment/adoption design and validate overlap, pre-period or placebo diagnostics, attrition, interference policy, and cluster-level uncertainty; never tune on the estimated effect.

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 frozen baseline metric vector per eligible cluster
  • governed rollout-risk score when used
  • eligible cluster roster
  • wave count and exact operational capacity per wave
  • metric family, balance threshold, and risk/size weights

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": "assign teams or other aggregate clusters" }
  → finds "design_balanced_stepped_wedge_rollout"

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

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

Audit cluster randomization integrity

Audit cluster-randomized experiments for practical baseline imbalance and differential outcome observation, with cluster-size-weighted standardized differences and assignment permutation diagnostics.

Causal inference & experiment design

Estimate switchback policy effect

Estimate randomized operational switchback effects with unit and period fixed effects, declared washout exclusions, distributed carryover lags, overlap enforcement, and whole-unit bootstrap uncertainty.

Causal inference & experiment design

Audit causal claim negative controls

Gate a causal effect claim using prespecified negative outcome/exposure controls, Benjamini-Hochberg multiplicity control, and an omnibus chi-square falsification test.

Causal inference & experiment design

Audit growth incrementality experiment integrity

Audit aggregate randomized growth experiments before anyone trusts channel incrementality: enforce unique experimental units, nondegenerate logged propensities, both arms, control-spend discipline, baseline balance, spillover and evidence gates; then estimate propensity-weighted baseline-adjusted contribution, cluster-unit bootstrap uncertainty and incremental return on spend.

Causal inference & experiment design

Audit joint outcome network integrity

Audit whether a company-specific Bayesian joint-outcome network is fit for reliance by validating point-in-time lineage, DAG and CPT completeness, effective support, protected-attribute exclusions, and strictly out-of-time outcome calibration against a baseline.

Sequential Bayesian & bandits

Audit staggered rollout identification

Audit staggered team-by-team adoption with not-yet-treated controls and require every simultaneous pre-period interval to fit inside a governed equivalence margin.

Causal inference & experiment design

See every tool in Causal evidence & experiments →

Ready to See Your Engineering work clearly?

Request a free demo