# Interview Scheduling Loop

Propose interview slots to a candidate, negotiate timing over email, confirm the meeting, and set follow-up reminders through the organization's scheduling tool API.

## When to use

- A candidate has passed screening and needs an interview slot proposed and confirmed.
- A candidate has replied with availability changes and the interview needs to be rescheduled.
- A confirmed interview needs a pre-interview reminder or a post-interview follow-up nudge for the hiring team.

## Tools

- `send-email`
- `http-get`
- `http-post`
- `schedule-task`
- `update-memory`

## Playbook

1. Look up the candidate's open interview request and current status by calling `http-get` against the org's scheduling tool API, e.g. GET `https://api.schedulingtool.com/v1/candidates/{candidate_id}/interviews`. Auth is injected by the org's Integration row for this host — never ask for, echo, or hardcode credentials.
2. Pull the relevant interviewer's open availability windows with `http-get`, e.g. GET `https://api.schedulingtool.com/v1/interviewers/{interviewer_id}/availability?range=14d`.
3. Draft 2-3 candidate-facing slot options from the overlap of interviewer availability and candidate preferences, and send them with `send-email` to the candidate, cc'ing the recruiting coordinator.
4. When the candidate replies accepting or countering a slot, create the interview record with `http-post`, e.g. POST `https://api.schedulingtool.com/v1/interviews` with the chosen slot, candidate ID, and interviewer ID.
5. Send a confirmation email via `send-email` to both candidate and interviewer with the final date, time, format (video link or address), and any prep materials.
6. Use `schedule-task` to queue a reminder email 24 hours before the interview and a same-day reminder for the interviewer.
7. Use `schedule-task` to queue a post-interview follow-up task that prompts the hiring team for feedback within 24 hours of the interview ending.
8. Record the candidate's stage, confirmed slot, and any negotiation notes with `update-memory` so the next touchpoint has full context.
9. If the candidate raises an employee-relations concern (leave needs, accommodation requests, disputes) or the scheduling tool returns 401/403 or has no Integration configured, stop automated action and message a human via `send-message`, naming the specific service and scopes needed, or escalating the HR (human resources) matter for a human decision.

## Failure modes

- No interviewer availability overlaps candidate preferences within the requested window — escalate to the recruiting coordinator via `send-message` rather than proposing slots outside working hours.
- The scheduling tool API returns 401/403 or the org has no Integration configured for that host — stop and message a human, naming the service and scopes needed.
- Candidate proposes a time that conflicts with a newly booked interviewer event — re-check availability with `http-get` before confirming, since availability can change between negotiation rounds.
- A reply contains a sensitive HR (human resources) topic such as a leave request, disability accommodation, or workplace complaint — do not attempt to resolve it; escalate to a human immediately.

## Done when

- The interview is confirmed in the scheduling tool with both parties notified by email.
- Pre-interview and post-interview follow-up reminders are scheduled via `schedule-task`.
- Candidate stage and interview details are saved via `update-memory`, and any sensitive or out-of-scope matters have been escalated to a human.