Optimize technical debt paydown portfolio

Choose a dependency- and exclusion-safe technical-debt portfolio under capacity and cash budgets by discounting compounding recurring drag, failure exposure, remediation effectiveness, risk reduction, and engineering opportunity cost.

What it's for

Turns technical debt from a qualitative backlog label into a transparent capital-allocation case with avoided cost, NPV, break-even period, and cost of another period's deferral.

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
capacity_opportunity_cost_per_unit number ≥ 0 Your calibration Optional
cash_budget number ≥ 0 Your calibration Yes
debt_items array of objects (11 fields) Evidence Yes
discount_rate_per_period number ≥ 0, ≤ 1 Your calibration Optional
horizon_periods integer ≥ 1, ≤ 120 Your calibration Optional
max_detail_rows integer ≥ 1, ≤ 500 Numerical control Optional
maximum_selected_items integer ≥ 1, ≤ 500 Your calibration Optional

Each debt_items record

Field Type Required
capacity_cost number (≥ 0) Yes
cash_cost number (≥ 0) Yes
depends_on array of string Yes
drag_growth_rate_per_period number (≥ -0.99, ≤ 5) Yes
exclusion_group string (non-empty) Optional
failure_loss number (≥ 0) Yes
failure_probability_per_period number (≥ 0, ≤ 1) Yes
id string (non-empty) Yes
recurring_drag_cost number (≥ 0) Yes
remediation_effectiveness number (≥ 0, ≤ 1) Yes
risk_reduction number (≥ 0, ≤ 1) Yes
Example input
{
  "capacity_budget": 5,
  "capacity_opportunity_cost_per_unit": 5,
  "cash_budget": 100,
  "debt_items": [
    {
      "capacity_cost": 2,
      "cash_cost": 50,
      "depends_on": [],
      "drag_growth_rate_per_period": 0,
      "failure_loss": 0,
      "failure_probability_per_period": 0,
      "id": "platform-foundation",
      "recurring_drag_cost": 0,
      "remediation_effectiveness": 1,
      "risk_reduction": 1
    },
    {
      "capacity_cost": 3,
      "cash_cost": 50,
      "depends_on": [
        "platform-foundation"
      ],
      "drag_growth_rate_per_period": 0.1,
      "failure_loss": 200,
      "failure_probability_per_period": 0.05,
      "id": "release-bottleneck",
      "recurring_drag_cost": 50,
      "remediation_effectiveness": 0.8,
      "risk_reduction": 0.8
    }
  ],
  "discount_rate_per_period": 0.02,
  "horizon_periods": 8
}

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
{
  "decision": "technical_debt_paydown_portfolio_ready",
  "economics": {
    "baseline_discounted_debt_cost": 603.5468,
    "capacity_opportunity_cost_per_unit": 5,
    "discount_rate_per_period": 0.02,
    "horizon_periods": 8,
    "residual_discounted_debt_cost": 120.7094
  },
  "interpretation": "Savings are scenario economics, not measured causal effects; recurring drag, failure exposure, remediation effectiveness, and opportunity cost must be calibrated locally.",
  "method": "discounted_debt_interest_dependency_portfolio_v1",
  "portfolio": {
    "capacity_budget": 5,
    "capacity_used": 5,
    "cash_budget": 100,
    "cash_used": 100,
    "discounted_avoided_cost": 482.8375,
    "net_present_value": 357.8375,
    "one_period_deferral_cost": 45.549,
    "selected_items": 2
  },
  "sample": {
    "candidate_items": 2,
    "dependency_edges": 1
  },
  "search": {
    "evaluated_portfolios": 4,
    "global_optimum_guaranteed": true,
    "strategy": "exact_dependency_safe_enumeration"
  },
  "selected": [
    {
      "break_even_period": null,
      "capacity_cost": 2,
      "cash_cost": 50,
      "discounted_avoided_cost": 0,
      "id": "platform-foundation",
      "net_present_value": -60,
      "one_period_deferral_cost": -1.1765,
      "selected_as_dependency": true
    },
    {
      "break_even_period": 2,
      "capacity_cost": 3,

Truncated for display — the full payload is 53 lines.

How it works

Constrained optimization — Pick the best feasible option under real limits — budget, headcount, dependencies, capacity — rather than ranking a list and hoping it fits.

  1. 1 Project each debt item's recurring drag and expected failure loss over the governed horizon, apply remediation effectiveness and risk reduction, and discount avoided costs to present value.
  2. 2 Subtract cash cost and the organization-owned opportunity cost of engineering capacity to obtain item economics, break-even timing, and one-period deferral cost.
  3. 3 Expand every candidate to its full dependency closure and reject portfolios that violate capacity, cash, item-count, dependency, or mutual-exclusion constraints.
  4. 4 Enumerate the global feasible optimum for at most 18 items; above that boundary, use a disclosed dependency-closure greedy heuristic and never label it globally optimal.

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

  • Objectives use commensurable locally governed value units, constraints reflect real feasibility, and uncertainty covers plausible adverse inputs.
  • Drag, failure probability, loss, remediation effectiveness, and risk reduction are decision scenarios calibrated from local evidence and owner judgment, not causal facts inferred from commit counts.
  • The dependency graph is acyclic and exclusions represent genuinely incompatible remediation paths.
  • The recommendation is optimal only for its stated objective, feasible set, evidence, and solver guarantee; it is not a universal management optimum.
  • Portfolio NPV is a transparent scenario result, not a guaranteed saving; heuristic results require comparison with feasible baselines and local-search alternatives before commitment.

Minimum evidence

  • debt_items: required and organization-defined
  • capacity_budget: required and organization-defined
  • cash_budget: required and organization-defined

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

  • recurring drag and its per-period growth scenario
  • failure probability and loss exposure by debt item
  • candidate dependency graph and privacy-safe evidence provenance
  • remediation effectiveness and risk reduction
  • cash and engineering-capacity costs and budgets
  • capacity opportunity cost, horizon, and discount rate
  • maximum operationally feasible selected items

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 a dependency and exclusionsafe technicaldebt" }
  → finds "optimize_technical_debt_paydown_portfolio"

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

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

Analyze deep uncertainty minimax regret

Apply Savage minimax regret when scenario probabilities are not defensible, compare maximin and equal-weight choices, and use PRIM-style iterative peeling to discover compact context boxes where the robust choice remains vulnerable.

Decision analysis

Audit aggregate metric reversal

Detect Simpson's-paradox-style sign reversals between an executive aggregate relationship and its weighted within-stratum fixed-effect relationship, with whole-stratum bootstrap uncertainty and practical-magnitude gates.

Statistical audit & measurement

Audit informative metric missingness

Audit whether aggregate metric availability is associated with a governed outcome using permutation inference, bootstrap intervals, practical effect gates, and false-discovery control.

Statistical audit & measurement

Audit joint metric dependency drift

Detect changes in cross-metric dependence with empirical-copula ranks, random-feature permutation inference, sliced Wasserstein magnitude, and FDR-controlled pair diagnostics.

Statistical audit & measurement

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.

Statistical audit & measurement

Audit point in time model integrity

Gate an analytical or AI model on point-in-time correctness by auditing actual feature availability, snapshot creation, target-window ordering, outcome resolution, source-record reuse, and embargoed train/calibration/test boundaries, with row and feature diagnostics rather than a generic leakage warning.

Statistical audit & measurement

See every tool in Measurement integrity →

Ready to See Your Engineering work clearly?

Request a free demo