Optimize global review assignment
Assign an entire review portfolio globally under expertise, conflict, capacity, urgency, quality, independence, and load-balance constraints.
What it's for
Assigns the whole review queue at once under expertise, conflict, capacity, urgency and independence constraints — rather than greedily, one pull request at a time.
Evolves one-PR reviewer ranking into a portfolio-wide optimum that reserves scarce experts and exposes infeasible coverage.
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 |
|---|---|---|---|
| load_balance_weight | number ≥ 0 | Your calibration | Optional |
| minimum_expertise | number ≥ 0, ≤ 1 | Your calibration | Optional |
| review_requests | array of objects (8 fields) | Evidence | Yes |
| reviewers | array of objects (7 fields) | Evidence | Yes |
| unfilled_penalty | number ≥ 0 | Your calibration | Optional |
Each review_requests
record
| Field | Type | Required |
|---|---|---|
| author_team | string (non-empty) | Optional |
| due_in_hours | number (> 0) | Yes |
| excluded_reviewer_ids | array of string | Optional |
| id | string (non-empty) | Yes |
| priority | number (≥ 0, ≤ 1) | Yes |
| required_reviewers | integer (≥ 1, ≤ 10) | Yes |
| required_skills | array of string (≥ 1 item) | Yes |
| risk_probability | number (≥ 0, ≤ 1) | Yes |
{
"minimum_expertise": 0.2,
"review_requests": [
{
"author_team": "payments",
"due_in_hours": 4,
"id": "security-fix",
"priority": 1,
"required_reviewers": 1,
"required_skills": [
"security"
],
"risk_probability": 0.95
},
{
"author_team": "web",
"due_in_hours": 24,
"id": "ui-polish",
"priority": 0.3,
"required_reviewers": 1,
"required_skills": [
"frontend"
],
"risk_probability": 0.1
}
],
"reviewers": [
{
"capacity": 1,
"current_load": 0,
"historical_quality": 0.95,
"id": "security-specialist",
"median_response_hours": 2,
"skills": {
"frontend": 0.1,
"security": 1
},
"team": "platform"
},
{
"capacity": 1,
"current_load": 0,
"historical_quality": 0.8,
"id": "frontend-generalist", Truncated for display — the full payload is 53 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.
{
"coverage": {
"coverage_rate": 1,
"filled_slots": 2,
"required_slots": 2
},
"load_balance": {
"gini_after": 0,
"gini_before": 0
},
"method": "global_review_min_cost_flow_v1",
"optimization": {
"algorithm": "successive_shortest_path_min_cost_flow",
"convex_marginal_load_cost": true,
"flow_units": 2,
"objective_cost": -0.323283
},
"requests": [
{
"assignments": [
{
"components": {
"expertise": 1,
"historical_quality": 0.95,
"independence": 1,
"speed": 0.6065
},
"fit_score": 0.8861,
"reviewer_id": "security-specialist"
}
],
"candidate_count": 2,
"request_id": "security-fix",
"required_reviewers": 1,
"status": "covered",
"unfilled_slots": 0
},
{
"assignments": [
{
"components": {
"expertise": 0.9,
"historical_quality": 0.8,
"independence": 0.5, Truncated for display — the full payload is 74 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 Assign an entire review portfolio globally under expertise, conflict, capacity, urgency, quality, independence, and load-balance constraints.
- 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
- Objectives use commensurable locally governed value units, constraints reflect real feasibility, and uncertainty covers plausible adverse inputs.
- The recommendation is optimal only for its stated objective, feasible set, evidence, and solver guarantee; it is not a universal management optimum.
Minimum evidence
- review_requests: required and organization-defined
- reviewers: 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 Define the management decision, target outcome, aggregate unit, privacy boundary, cadence, and prediction/intervention horizon for this organization.
- 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 Estimate statistical parameters on training history, but obtain costs, utilities, risk tolerance, practical-effect thresholds, capacity, and policy constraints from accountable decision owners.
- 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 Deploy only if the returned decision clears evidence, overlap, calibration, robustness, and guardrail checks; warning, unsupported, schema-gap, and fallback decisions are abstentions.
- 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 an entire review portfolio globally" }
→ finds "optimize_global_review_assignment"
gitrevio_capability_describe
{ "capability_id": "optimize_global_review_assignment" }
→ returns the input schema and agent guidance shown on this page
gitrevio_capability_run
{ "capability_id": "optimize_global_review_assignment", "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
Fit incident hawkes process
Estimate incident aftershock dynamics with a stationary exponential Hawkes process and conditionally simulate near-term incident counts.
Simulate dependency cascade risk
Stress-test correlated baseline failures and directed dependency cascades with portfolio loss VaR/CVaR and risk contributions.
Allocate attention budget
Use exact knapsack optimization to allocate limited expert-review time by expected avoided loss.
Allocate capacity by marginal value
Allocate indivisible aggregate capacity across initiative-specific diminishing marginal-value scenario curves, activation thresholds, hard minimum commitments, unit cost, and portfolio CVaR with discrete next-unit value and explicit solver certainty.
Allocate capacity nash bargaining
Allocate discrete shared capacity by weighted Nash social welfare over concave team utility curves, with disagreement guarantees and a utilitarian counterfactual.
Calculate engineering runway
Compare three-point roadmap effort with three-point team capacity and expose unfunded commitments.