capacity-backfill-cascade
A phone-call workflow pattern for capacity recovery: confirm upcoming bookings, and when a guest cancels, offer the freed slot to waitlist candidates in priority order until one accepts. Works for restaurants, tours, classes, and any booking system with a waitlist.
When to use
- An upcoming booking list where cancellations free capacity
- A waitlist of guests who consented to receive offers
- A need to recover lost capacity without staff dialing
Prerequisites
- Python 3.10+ with the reference app installed:
cd apps/python/table-rescue && pip install -e . - CALL-E CLI installed and logged in (live mode only):
calle auth login --base-url https://seleven-mcp-sg.airudder.com --channel openagent_oauth
Workflow
- Prepare two JSONL inputs (schemas in
references/io-schemas.md): reservations and waitlist. Every record needs an explicitconsentflag; non-consented records are never dialled. - Run a dry-run first and inspect the audit and report:
python scripts/run_cascade.py --data-dir <dir> --state-dir <dir> - Only when the plan looks right, place real calls with an explicit budget:
python scripts/run_cascade.py --data-dir <dir> --state-dir <dir> --live --max-calls 6 - Review the masked staff report at
state/runs/<run-id>/report.md; escalate no-answer and error targets manually.
Safety rules
- Dry-run is the default; live requires
--live. - Never exceed the call budget; the engine stops before dialing when the budget is out.
- Never dial a record without consent.
- The call goals instruct the agent to identify itself as an automated assistant at the start of every call (disclosure by design).
- Reruns with the same run id skip already-dialled targets (duplicate prevention).
- Cancel a run with
table-rescue cancel --run-id <id>; later runs refuse to dial. - Mask phone numbers in any output you produce; never log full numbers or tokens.
- Live destinations must pass region-aware E.164 validation and appear in the
operator's
authorized_destinations.jsonlallowlist; the run prints a manifest and requires confirmation before the first call. - The MCP origin is pinned;
--base-urlcannot point anywhere else. - Uncertain outcomes (no answer, unparseable or wrong-family tokens, provider
failures) mark the target NEEDS_REVIEW and stop the run; use
table-rescue resumeafter human review. - Out of scope: medical, legal, financial, and emergency content.
References
references/flow.md- phase diagram and decision tablereferences/io-schemas.md- input and output schemas, OUTCOME protocolreferences/calle-cli-mapping.md- how each step maps to CALL-E auth and MCP calls