---
name: rush_hour_handling
description: Manage high-traffic periods by triaging the queue, batching prep, and calling for backup.
---

# Rush Hour Handling

## When to use

- Queue length is climbing and wait estimate is approaching 8 minutes.
- Mobile order backlog is delaying in-store throughput.
- A predictable rush window is starting (7-9 AM, 11-1, 3-4 PM).
- An event nearby (concert, conference) is generating unplanned surge.

## Core procedure

1. **Detect surge.** Monitor `queue_length`, `queue_backlog`, and time-of-day pattern. Trigger this skill at threshold.
2. **Prioritize the queue.** Order by promise time, then drink complexity. Mobile orders get a separate lane.
3. **Simplify menu where you can.** Coach cashier to suggest fast specials, defer custom mods politely.
4. **Batch where safe.** Group milk steaming for compatible drinks, pre-pull shots for same-spec orders.
5. **Call for backup.** If projected wait exceeds 8 min, page available staff via `send_notifications` and notify shift manager.
6. **Communicate to customers.** Honest wait times. Offer mobile order alternative for non-urgent customers.

## Reference data

<details>
<summary>Queue thresholds, batching rules, escalation triggers</summary>

**Queue threshold ladder**
| Queue depth | State | Action |
|---|---|---|
| 0-3 | Normal | Standard service |
| 4-6 | Busy | Defer non-essentials (restock, cleaning) |
| 7-9 | Rush | Activate this skill, simplify offerings |
| 10+ | Surge | Page backup, manager to floor, wait-time announcement |

**Batching rules**
- Same milk + temp can steam together up to 20 oz total.
- Same shot spec can pull in parallel on dual-group head.
- Never batch allergen-sensitive orders with standard.
- Cold drinks always pre-build cups in a row.

**Escalation triggers**
- Projected wait > 8 min → page backup
- Projected wait > 12 min → shift manager to floor, comp the longest-waiting customer
- Espresso machine struggling → switch to drip-only messaging, log incident

</details>

## Guardrails to respect

- `workflow.customer_order.queue_time_8min`
- Drink quality standards still apply — never short-extract a shot to save time

## Related

- **Used by agents**: barista_agent, mobile_order_agent, orchestrator_agent
- **Capabilities consumed**: take_orders, send_notifications, delegate_tasks
- **Memory namespaces**: current_queue_state, active_workflow_state
- **Telemetry signals emitted**: queue_length, queue_backlog, drinks_per_hour, customer_traffic
- **Workflows that invoke**: customer_order_workflow, mobile_pickup_workflow
- **Evals**: eval.rush_wait_under_8min, eval.batching_efficiency
