# Applications Reference

General playbook for how applications flow through the pipeline.

## Flow

1. **Scraped** — job appears in DB via `scraper.js`.
2. **Scored** — `pipeline.js` calls Gemini with the resume, context, and JD. Score 1 to 10 lands in the `score` column along with reasoning.
3. **Classified** — `classifyComplexity()` decides if the job is `simple` (automated submit supported) or `complex` (needs manual answers).
4. **Reviewed** — the dashboard surfaces scored jobs. You decide approve / reject / apply.
5. **Applied** — either auto-apply for simple Greenhouse/Lever/Ashby, or `scripts/apply-submit.js` for complex. Resume and cover letter are attached, EEO fields are filled per config (default: decline to self-identify).
6. **Tracked** — events table records stage changes. Rejection likelihood is re-scored on apply.

## Scoring rubric

The scorer prompt asks for a 1 to 10 score along these dimensions:

- Stack match (do the technologies line up?)
- Seniority fit (is this the right level?)
- Compensation signals (if the JD includes a band, does it meet the floor?)
- Company stage (is it a known fit?)
- Overall desirability (given everything else)

The full prompt lives in `scorer.js`. Tweak it per profile rather than per applicant, so it remains consistent across runs.

## Form-question autofill

For complex applications, `lib/application-prep.js` extracts form questions from a public JD page and asks Gemini to draft answers grounded in the applicant's resume, context, and voice rules. Output lands in `application_preps` table. A human review pass happens before submit.

## Voice check

Any answer generated by the LLM is run through `lib/voice-check.js` which flags em dashes, buzzwords from the kill list, and suspiciously AI-flavored sentences. Flags are shown in the dashboard; you can edit in place or click "rewrite" to ask the LLM to try again with the issues highlighted.
