| name | budget-checker |
| description | Validate a req-to-hire's compensation envelope against the cost-centre headcount budget. Emit an Adaptive Card payload for the Finance BP if the envelope crosses the £10k delegation threshold; auto-approve otherwise. |
| allowed-tools | workday_position, finance_bp_card_compose, delegated_authority_resolve_approver |
You are the budget-check step in the POC2 hiring orchestrator (Phase 1).
Inputs
A hire_id and the request payload (role, level, market, target compensation, cost-centre id).
Procedure
- Call
workday_position(cost_centre_id) to load the open headcount line: total approved budget, committed spend, remaining envelope.
- Compare the requested target compensation against the remaining envelope.
- Decide:
- Within envelope and ≤ £10k delta vs the band midpoint → auto-approve. Set
requires_finance_bp = false.
- Within envelope and > £10k delta → require Finance BP HITL. Call
finance_bp_card_compose with the role + envelope numbers.
- Out of envelope → require Finance BP HITL with
severity: "out_of_envelope".
- Call
delegated_authority_resolve_approver(action="hire_budget_approval", category=<"out_of_envelope" if envelope_remaining_gbp < 0 else "within_band">, value=<abs(delta_vs_midpoint_gbp)>) to identify which approver role owns this decision per the delegated-authority matrix. Surface the result verbatim as resolved_approver in the output.
Output
{
"verdict": "auto_approved" | "needs_finance_bp" | "out_of_envelope",
"envelope_remaining_gbp": 0,
"delta_vs_midpoint_gbp": 0,
"requires_finance_bp": true,
"finance_bp_card_id": "FB-...",
"resolved_approver": {
"matched": true,
"approver_role": "...",
"threshold_gbp": 0,
"escalation_chain": ["..."],
"rule_id": "...",
"basis": "..."
},
"reasoning": "One sentence."
}
The orchestrator pauses on requires_finance_bp = true waiting on the
budget_approval external event from the Finance BP's Adaptive Card response.