TL;DR: Never read a candidate's current job title from a cover letter. Cover letters state the role being applied for, which looks exactly like a job title in the header. After the fix, current title comes only from the resume's experience section.

```text
parser agent read the target role from a cover-letter header as the candidate's current job title
```

1. Check which document the title came from. Expected: the stored "current job title" was filled from a file that is actually a cover letter, not a resume.
2. Add document-type detection: if the text contains phrases like "Dear Hiring Manager", "I am applying for", or "I am excited to apply", tag it as a cover letter. Expected: the file gets tagged as cover letter, not resume.
3. Change the title rule: current title is the most recent entry in the resume's experience section only, and cover letters contribute zero fields. Expected: the title now matches the resume's latest role, or stays empty if the resume has no clear latest role.
4. Re-parse the candidate and compare to the PDF. Expected: the stored title matches the resume, not the applied-for role.

## Use this when
- A candidate's stored title matches the job posting they applied to
- The parse input included a cover letter alongside or instead of a resume
- Titles look suspiciously like the exact role name from the job description

## Not for this skill when
- The input was definitely a resume and the title is still wrong (that is an experience-section parsing bug)
- The candidate genuinely holds the title they applied for (verify against the resume first)
- The wrong field is the company name, not the title

## Variant phrasings
### Parser used the applied-for role as the candidate's current title
### Cover letter job title parsed as current employment
### Agent stored the target role from the cover letter header

## Why it happens
Cover letters put the target role in a prominent header ("Application for Senior Backend Engineer"), which is exactly where a resume puts the candidate's headline title. A parser that fills the title field from whatever document it sees first cannot tell the two apart without classifying the document type first.

## Edge cases
- Combined PDF with cover letter first and resume after: split on the document-type boundary and parse only the resume portion for employment fields
- Cover letters without the standard phrases: fall back to structure (a cover letter has salutation and sign-off paragraphs, a resume has section headers like Experience and Education)
- Candidates whose cover letter header legitimately states their current title too: the resume still wins as the source of truth

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst__ar1uLOqEUhe8R8_eFevMA
