Optimize error budget portfolio

Choose dependency-safe reliability interventions under money and capacity constraints using posterior SLO-breach economics.

What it's for

Turns SLO breach probability into money, then picks the dependency-safe set of reliability investments that fits your budget and your engineers' available time.

Turns reliability evidence and error-budget burn into an economically optimized engineering-work portfolio.

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
capacity_budget number ≥ 0 Your calibration Yes
interventions array of objects (10 fields) Evidence Yes
money_budget number ≥ 0 Your calibration Yes
prior_bad_alpha number > 0 Your calibration Optional
prior_good_beta number > 0 Your calibration Optional
seed integer Numerical control Optional
services array of objects (11 fields) Evidence Yes
simulations integer ≥ 200 Numerical control Optional

Each services record

Field Type Required
bad_event_cost number (≥ 0) Yes
elapsed_days number (> 0) Yes
future_daily_requests_high number (≥ 0) Yes
future_daily_requests_likely number (≥ 0) Yes
future_daily_requests_low number (≥ 0) Yes
id string (non-empty) Yes
observed_bad_events integer (≥ 0) Yes
observed_requests integer (≥ 1) Yes
period_days number (> 0) Yes
slo_breach_cost number (≥ 0) Yes
slo_target number (> 0, < 1) Yes
Example input
{
  "capacity_budget": 4,
  "interventions": [
    {
      "capacity_units": 2,
      "cost": 20000,
      "effect_high": 0.95,
      "effect_likely": 0.9,
      "effect_low": 0.85,
      "id": "cache_failover",
      "lead_time_days": 1,
      "service_id": "checkout"
    }
  ],
  "money_budget": 100000,
  "seed": 13,
  "services": [
    {
      "bad_event_cost": 100,
      "elapsed_days": 15,
      "future_daily_requests_high": 11000,
      "future_daily_requests_likely": 10000,
      "future_daily_requests_low": 9000,
      "id": "checkout",
      "observed_bad_events": 200,
      "observed_requests": 100000,
      "period_days": 30,
      "slo_breach_cost": 1000000,
      "slo_target": 0.999
    }
  ],
  "simulations": 200
}

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": [
    "Intervention effects combine multiplicatively and apply only after their lead time.",
    "Breach probability reflects posterior rate and demand uncertainty; future event-count noise is represented through expected counts."
  ],
  "baseline": {
    "expected_operating_loss": 1029947.12,
    "services": [
      {
        "error_budget_margin": {
          "mean": -250.13,
          "p05": -286.19,
          "p50": -250.68,
          "p95": -217.54
        },
        "expected_future_bad_events": 299.47,
        "probability_slo_breach": 1,
        "service_id": "checkout"
      }
    ]
  },
  "expected_net_value": 620240.33,
  "method": "bayesian_slo_portfolio_enumeration_v1",
  "optimization": {
    "capacity_budget": 4,
    "feasible_portfolios": 2,
    "money_budget": 100000,
    "posterior_draws": 200
  },
  "recommended_portfolio": {
    "capacity_used": 2,
    "expected_operating_loss": 389706.8,
    "expected_total_cost": 409706.8,
    "investment_cost": 20000,
    "operating_loss": {
      "mean": 389706.8,
      "p05": 3652.43,
      "p50": 4973.2,
      "p95": 1005931.75
    },
    "selected_interventions": [
      "cache_failover"
    ],
    "services": [

Truncated for display — the full payload is 74 lines.

How it works

Sequential Bayesian & bandits — Learn while deciding — update beliefs as evidence arrives and choose where the next unit of effort is worth spending.

  1. 1 Choose dependency-safe reliability interventions under money and capacity constraints using posterior SLO-breach economics.
  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

  • The likelihood or reward model, prior support, action logging, delayed outcomes, and any stationarity assumptions match the deployment process.
  • Posterior probability and adaptive selection are model-conditional; they are not substitutes for randomized propensities or guaranteed safety.

Minimum evidence

  • services: required and organization-defined
  • interventions: required and organization-defined
  • money_budget: required and organization-defined
  • capacity_budget: required and organization-defined

How to validate it

Backtest the chosen action against simple feasible baselines on held-out scenarios, sweep costs/constraints/risk tolerance, and require constraint feasibility under adverse inputs.

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

  • metric/outcome definitions, entity grain, observation window, costs, thresholds, priors, and constraints represented by the function inputs

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": "choose dependencysafe reliability interventions under money" }
  → finds "optimize_error_budget_portfolio"

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

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

Estimate engineering portfolio VAR

Estimate correlated cost, schedule, success, value-decay and portfolio downside VaR/CVaR with initiative tail attribution.

Constrained optimization

Optimize roadmap real options

Optimize continue, defer, abandon and expand decisions across staged initiatives using Bellman recursion and current capital rationing.

Constrained optimization

Audit CI pipeline evidence integrity

Audit the complete point-in-time change-to-pipeline-to-job-to-rerun cohort, exposing missing CI, orphan records, future leakage, inconsistent required-job outcomes, incomplete provider evidence and same-configuration fail-then-pass flake proxies without scoring people.

Statistical audit & measurement

Audit incident learning evidence integrity

Audit the complete point-in-time incident-to-postmortem-to-corrective-action lineage, separating missing or contradictory evidence from genuine overdue learning debt without attributing individual fault.

Statistical audit & measurement

Audit operational alert decision integrity

Audit every point-in-time operational alert evaluation by recomputing fire/suppress decisions and verifying effective policy, cooldown, evidence freshness, context, controls, severity routing, acknowledgement, action and mature outcome lineage.

Constrained optimization

Audit root cause traceback evidence integrity

Audit whether an anomaly traceback is complete, point-in-time, multiplicity-controlled and honestly labeled as temporal or causal, including every upstream candidate, path lag, edge identification basis and later root-recovery validation.

Causal inference & experiment design

See every tool in Quality, incidents & reliability →

Ready to See Your Engineering work clearly?

Request a free demo