---
name: staffing_coordination
description: Maintain shift coverage when staff change, leave early, or no-show — detect gaps, find replacements, update schedules, communicate.
---

# Staffing Coordination

## When to use

- An employee calls in sick or no-shows.
- An employee requests an early-out or schedule swap.
- Forecast indicates understaffing for an upcoming slot.
- An employee's break interlock would leave a station uncovered.

## Core procedure

1. **Detect the gap** — either from an explicit absence event or from a coverage check that compares `scheduling_system` actuals against `staffing_policy` minimums.
2. **Check availability** — pull the on-call list and current availability via `scheduling_system.list_availability`. Cross-reference against `staff_performance` to prefer well-rated staff for high-traffic slots.
3. **Request a fill** — push a request through `notifications.send_push` or `send_sms` based on the employee's preference, with the slot details and a response deadline (typically 10 minutes).
4. **Confirm** — once a responder accepts, write the assignment via `scheduling_system.assign` and notify the originating manager.
5. **Update the schedule** — publish the change so the broader team can see updated coverage. Update `staff_performance_history` with the responder's pickup record.
6. **Fallback** — if no one accepts within deadline, escalate to `shift_manager_agent` (or the human operator if shift_manager is the one who's out).

## Reference data

<details>
<summary>On-call rules, swap rules, break-policy interlocks</summary>

**On-call hierarchy:**
1. Staff who have opted in to on-call notifications and are currently off-shift
2. Staff who have opted in and are on-shift but at a lower-priority slot (cover-up call)
3. Cross-trained staff from adjacent locations (if multi-shop)
4. Manager fills the gap personally

**Swap rules:**
- Swaps within the same week may be approved by staffing_coordination without manager review provided both employees consent and coverage minimums are maintained.
- Cross-week swaps require shift_manager_agent approval.
- No employee may work more than 6 consecutive days without manager override.

**Break interlocks (`company.break_policy`):**
- Mandatory unpaid 30-min lunch on shifts ≥6 hours
- Two paid 10-min breaks on shifts ≥4 hours
- Breaks may be flexed by ±15 minutes from scheduled time to maintain coverage; greater flex needs manager approval.

</details>

## Guardrails to respect

- `company.break_policy` (enforced through scheduling, not by this skill — but respect the interlocks when proposing fills).

## Related

- **Used by agents**: shift_manager_agent (primary)
- **Capabilities consumed**: schedule_staff, send_notifications
- **Memory namespaces**: staff_performance, staff_performance_history
- **Telemetry signals emitted**: staffing_coverage, shift_performance
- **Workflows that invoke**: staffing_workflow, opening_workflow, closing_workflow
- **Evals**: workflow.staffing_efficiency, agent.shift_manager.shift_efficiency
