Forecast knowledge continuity semimarkov

Forecast critical code-knowledge continuity with a company-local hierarchical Bayesian semi-Markov model whose state-exit hazard depends on time already resilient, concentrated, orphaned or recovering; require a strict latest-period holdout improvement over persistence, simulate coherent common shocks, and expose orphaning, delay, recovery-cost and portfolio VaR/CVaR without predicting named departures.

What it's for

Turns a static bus-factor snapshot into a validated forward view of which critical systems may become orphaned, how long recovery could take, and what the economic tail means for delivery and diligence.

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_units array of objects (8 fields) Evidence Yes
historical_periods array of objects (9 fields) Evidence Yes
holdout_fraction number > 0, < 1 Your calibration Optional
horizon_periods integer ≥ 1, ≤ 120 Your calibration Optional
max_detail_rows integer ≥ 1, ≤ 500 Numerical control Optional
maximum_holdout_ece number ≥ 0, ≤ 1 Your calibration Optional
minimum_log_loss_improvement number ≥ 0 Your calibration Optional
minimum_training_transitions integer ≥ 5, ≤ 100000 Your calibration Optional
scenarios array of objects (6 fields) Evidence Yes
seed integer ≥ 0, ≤ 4294967295 Numerical control Optional
simulation_draws integer ≥ 200, ≤ 20000 Numerical control Optional
tail_probability number > 0, < 1 Your calibration Optional

Each historical_periods record

Field Type Required
evidence_verified boolean Yes
id string (non-empty) Yes
next_state one of "resilient", "concentrated", "orphaned", "recovering" Yes
outcome_matured boolean Yes
period integer (≥ 0) Yes
state one of "resilient", "concentrated", "orphaned", "recovering" Yes
state_age_periods integer (≥ 0) Yes
unit_class_id string (non-empty) Yes
unit_ref string (non-empty) Yes
Example input
{
  "current_units": [
    {
      "criticality_value": 10,
      "current_state": "concentrated",
      "delay_cost_per_period": 5,
      "evidence_verified": true,
      "id": "payments",
      "recovery_cost": 25,
      "state_age_periods": 1,
      "unit_class_id": "service"
    }
  ],
  "historical_periods": [
    {
      "evidence_verified": true,
      "id": "knowledge-0-0",
      "next_state": "resilient",
      "outcome_matured": true,
      "period": 0,
      "state": "resilient",
      "state_age_periods": 0,
      "unit_class_id": "service",
      "unit_ref": "unit-0"
    },
    {
      "evidence_verified": true,
      "id": "knowledge-0-1",
      "next_state": "concentrated",
      "outcome_matured": true,
      "period": 1,
      "state": "resilient",
      "state_age_periods": 1,
      "unit_class_id": "service",
      "unit_ref": "unit-0"
    },
    {
      "evidence_verified": true,
      "id": "knowledge-0-2",
      "next_state": "orphaned",
      "outcome_matured": true,
      "period": 2,
      "state": "concentrated",
      "state_age_periods": 0,

Truncated for display — the full payload is 3559 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": {
    "age_buckets": [
      "new",
      "established",
      "persistent"
    ],
    "class_shrinkage": "Beta leave hazards and Dirichlet destinations shrink to the company-wide state model",
    "common_scenario_per_draw": true,
    "individual_departure_prediction_permitted": false,
    "simulation_draws": 200,
    "states": [
      "resilient",
      "concentrated",
      "orphaned",
      "recovering"
    ]
  },
  "decision": "accepted",
  "knowledge_unit_forecasts": [
    {
      "expected_loss": 46.225,
      "expected_unavailable_periods": 3.295,
      "knowledge_unit_id": "payments",
      "p90_loss": 67.5,
      "probability_orphaned": 1,
      "supported": true,
      "unit_class_id": "service"
    }
  ],
  "limitations": [
    "The estimand is continuity of a technical knowledge unit, not the probability that a named person leaves.",
    "Scenario multipliers are governed stresses, not learned causal effects.",
    "State definitions and period cadence must remain stable across training, validation, and forecast inputs."
  ],
  "method": "hierarchical_bayesian_semi_markov_knowledge_continuity_v1",
  "portfolio_forecast": {
    "conditional_value_at_risk": 67.5,
    "expected_loss": 46.225,
    "horizon_periods": 6,
    "tail_probability": 0.1,
    "value_at_risk": 67.5
  },
  "validation": {

Truncated for display — the full payload is 58 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 Build a complete zero-inclusive mature unit-period panel over stable resilient, concentrated, orphaned and recovering definitions; reserve the latest whole periods before fitting anything.
  2. 2 Fit class-shrunk Beta state-exit hazards by duration bucket and Dirichlet next-state distributions, then compare multiclass log loss and leave-probability calibration with a persistence baseline on the untouched holdout.
  3. 3 For each current knowledge unit, sample posterior transition dynamics under one coherent operating scenario per draw and price orphaned/recovering periods plus recovery events into unit and portfolio loss, VaR and CVaR; downgrade to diagnostic-only on weak transitions, poor validation, unverified evidence or unseen classes.

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.
  • State definitions, period cadence, knowledge-unit identity, maturity rules, criticality, delay/recovery economics and scenario multipliers remain comparable from training through forecast origin.
  • Posterior probability and adaptive selection are model-conditional; they are not substitutes for randomized propensities or guaranteed safety.
  • The model forecasts aggregate technical-unit continuity states, not whether a named person will leave, and scenario multipliers are stresses rather than causal estimates.

Minimum evidence

  • historical_periods: required and organization-defined
  • current_units: required and organization-defined
  • scenarios: required and organization-defined

How to validate it

Use chronological train/calibration/test windows, compare proper scores and decision value with a simple baseline, and recalibrate only from outcomes resolved after prediction time.

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

  • chronologically versioned resilient/concentrated/orphaned/recovering state panel derived from accepted concentration audits and verified recovery outcomes, with one next state per mature unit-period and no post-origin information
  • state definitions, period cadence, maturity and recovery rules, unit/class continuity, latest-period holdout, minimum transition support, log-loss/ECE improvement gates, horizon, scenario probabilities/multipliers, finance price basis and CVaR appetite

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 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": "forecast critical codeknowledge continuity with a" }
  → finds "forecast_knowledge_continuity_semimarkov"

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

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

See every tool in People, retention & knowledge →

Ready to See Your Engineering work clearly?