--- name: find-roles description: Finds live internship, co-op, and new-grad SWE / data science / ML roles for DS/CS students in Canada and the US from public Greenhouse, Lever, and Ashby job-board APIs, LinkedIn Jobs (via linkedin-browser), Hacker News "Who is hiring", and optionally the user's JobRight feed, and records them in profile/roles.md. Use when the user asks to find jobs, internships, new-grad openings, or what a company is hiring for, or pastes a posting to add. --- # find-roles ## Inputs - `profile/prefs.yml`: roles, `role_keywords`, seasons, `locations` (cities / countries / remote_in), exclusions. - `profile/boards.yml` (copy from `resources/boards.example.yml`). - A pasted posting or URL, if the user gives one: skip to step 4 with it. ## Steps 1. **ATS boards.** Run `python /scripts/ats_fetch.py profile/boards.yml profile/prefs.yml > output/roles-.json`. It keeps student-level, on-target titles in the user's locations and includes JD text. Read its stderr counts; a board that errors is reported, not retried. 2. **LinkedIn Jobs.** Run `linkedin-browser` in `jobs` mode with the user's roles and locations (or ask the user to paste a LinkedIn search results page). For each card prefer the original ATS link: if it's a Greenhouse/Lever/Ashby URL, it's the same vacancy as any ATS row with that req id. 3. **Other sources.** HN: find this month's "Ask HN: Who is hiring?" via `https://hn.algolia.com/api/v1/search?query=who%20is%20hiring&tags=story,author_whoishiring` and keep comments mentioning intern / new grad / junior. JobRight: only if `jobright: true`, per `resources/jobright.md`. 4. **Location check.** Keep a role when it names one of `cities`, a city in `countries`, or is remote and open to a `remote_in` country. Bare "Remote" with no country → keep with `location: unknown — verify`. Anything else → drop. 5. **Liveness.** API rows are live. For LinkedIn, HN, and pasted URLs, fetch the page; drop 404s, redirects to a generic careers page, and "no longer accepting". Pasted text you can't fetch stays, marked `captured from paste on `. 6. **Dedupe** by req id / LinkedIn job id / URL alias, never by company + title alone (two internships can share both). 7. **Record** each new role in `profile/roles.md` (format below) and show a table: role_id | company | title | location | source | posted | notes (sponsorship text, season, salary if posted). Done when every kept role has a `roles.md` section with its JD text. Offer `score-fit`. ## `profile/roles.md` format ``` ## - company: … · title: … · location: … · source: greenhouse|lever|ashby|linkedin|hn|jobright|paste - url: · aliases: [, …] · req_id: … · posted: … · captured: - salary: · hiring_team: [] ### JD ``` `role_id` = `-`. `score-fit` appends a `### Fit` block; nothing else edits a role section. ## Rules - Public APIs, `linkedin-browser`, and the read-only JobRight exception only. - The human applies; this skill never clicks Apply. - ≤1 request/sec per host.