# Applicant Screening Summary

Parse candidate resumes and score each applicant against the role's scorecard, producing structured screening notes for hiring teams.

## When to use

- A new batch of resumes has arrived for an open requisition and needs a first-pass review.
- You need consistent, scorecard-based notes so hiring managers can compare candidates fairly.
- An applicant tracking system (ATS) has attachments that must be extracted and evaluated before a human recruiter screen.
- A recruiter asks for a ranked summary of applicants against specific must-have and nice-to-have criteria.

## Tools

- `http-get`
- `fetch-file`
- `parse-document`
- `write-file`

## Playbook

1. Call the ATS REST API with `http-get` to retrieve the role scorecard and the list of applicants for the requisition (e.g. GET https://api.example-ats.com/v1/requisitions/{id}/scorecard). Auth is injected by the org's Integration row for this host — never ask for, echo, or hardcode credentials. On 401/403 or missing Integration, stop and message a human via send-message naming the service and scopes.
2. For each applicant, call `http-get` against the ATS to fetch the resume attachment URL and any application-form answers (e.g. GET https://api.example-ats.com/v1/applications/{id}).
3. Use `fetch-file` to download each resume attachment (PDF, DOCX, or scanned image) referenced by the ATS record.
4. Use `parse-document` to extract plain text from the downloaded resume, including work history, skills, and education sections.
5. Compare the extracted resume content against the scorecard criteria (required skills, years of experience, education, location fit) and note matches, gaps, and open questions for each item.
6. Draft a per-applicant screening note: summary of fit, scorecard line-item ratings, standout strengths, red flags or missing information, and a recommended next stage (e.g. "advance to phone screen," "hold," "not a fit") — clearly labeled as a draft recommendation, not a final decision.
7. Use `write-file` to save the structured screening notes (one file per applicant or one combined roster file) to the shared output location the requesting team specified.
8. If any application involves a sensitive employee-relations matter (e.g. a current employee's internal transfer application referencing a leave, complaint, or dispute), stop scoring and escalate to HR humans instead of proceeding.

## Failure modes

- Resume file is a low-quality scan and `parse-document` returns garbled or partial text — flag the applicant record as "needs manual review" rather than guessing at missing content.
- Scorecard criteria fetched via `http-get` are incomplete or missing weights — pause and ask a human recruiter to confirm the criteria before scoring.
- Extracted resume lacks information needed to judge a required criterion (e.g. no clear years of experience) — mark that line item as "insufficient data" instead of inferring a score.
- Application content raises an employee-relations or legally sensitive topic (disability, leave, protected class information) — do not score or comment on it; escalate to HR humans immediately.

## Done when

- Every applicant in the batch has a structured screening note covering scorecard fit, strengths, gaps, and a draft stage recommendation.
- All notes are saved via `write-file` to the requested location and are ready for a human recruiter's final review and decision.
- Any sensitive or out-of-scope items encountered were escalated to HR humans rather than resolved autonomously.