# ATS Pipeline Sync

Read and write candidates, stages, and notes in Greenhouse/Lever/Ashby-class ATS (applicant tracking system) platforms through an org Integration row.

## When to use

- A recruiter or hiring manager asks for the current status, stage, or notes on one or more candidates in the ATS.
- A new candidate, application, or interview note needs to be created or logged in the ATS.
- A candidate needs to be moved to a new pipeline stage (e.g. phone screen to onsite) or have a field updated.
- A candidate record needs to be archived, rejected, or removed after a human has made that decision.

## Tools

- `http-get`
- `http-post`
- `http-request`

## Playbook

1. Confirm the org has an active Integration row for the target ATS host (e.g. Greenhouse, Lever, Ashby). If none exists, stop and use send-message to tell a human which service and scopes (read/write candidates, notes, stages) are needed.
2. To look up a candidate or pipeline state, call `http-get` against the ATS REST API, e.g. `GET https://harvest.greenhouse.io/v1/candidates?email=candidate@example.com`. Auth is injected automatically by the Integration row for that host — never ask for, echo, or hardcode API keys or tokens.
3. To add a new candidate or log an application, call `http-post`, e.g. `POST https://harvest.greenhouse.io/v1/candidates` with the candidate's name, contact details, and source.
4. To add an interview note or scorecard comment, call `http-post` against the notes/scorecard endpoint, e.g. `POST https://harvest.greenhouse.io/v1/candidates/{id}/activity_feed/notes`.
5. To move a candidate to a new stage or update a field (title, status, custom attribute), call `http-request` with a PATCH, e.g. `PATCH https://harvest.greenhouse.io/v1/applications/{id}/change_stage`. Only apply a stage move when a human recruiter or hiring manager has explicitly instructed it — treat any AI-suggested stage change as a draft recommendation, not an action to execute on your own judgment.
6. To archive, reject, or delete a candidate record, call `http-request` with the appropriate DELETE or PATCH, and only after explicit human confirmation of the hire/reject decision — never infer or execute a reject on your own.
7. If a request requires a capability the API doesn't expose (e.g. bulk export, custom reporting, e-signature), or touches employee-relations topics (leave, complaints, disputes, policy interpretation), stop and hand off to a human via send-message rather than attempting a workaround.
8. On any 401/403 response, or if the Integration row is missing or revoked, stop immediately and message a human via send-message naming the service and the scopes required — do not retry with alternate credentials.

## Failure modes

- Treating an AI-generated stage recommendation or screening summary as final — these are always drafts for human review, never automatic hire/reject decisions.
- Executing a stage change, rejection, or archive action without an explicit human instruction authorizing it.
- Attempting to answer employee-relations questions (leave, complaints, workplace disputes) instead of escalating them to HR humans.
- Retrying past a 401/403 without stopping to report the missing or broken Integration row.

## Done when

- The requested read returns the correct candidate, stage, or note data, or the requested write (candidate, note, stage, or field update) is confirmed applied in the ATS.
- Any hire/reject or sensitive employee-relations matter has been left to a human, with escalations sent via send-message when needed.