Skip to content

feat(resume): write Chinese and English resumes that cite Facts - #17

Merged
codeotter0201 merged 1 commit into
mainfrom
feat/issue-5-tailored-resumes
Nov 8, 2026
Merged

codeotter0201 merged 1 commit into
mainfrom
feat/issue-5-tailored-resumes

Conversation

@codeotter0201

Copy link
Copy Markdown
Owner

Summary

Implements Tailored resumes from #5: for an evaluated Application, a Chinese and an English resume in Markdown and PDF that start from the Role profile, use only sourced Facts, and cite them line by line.

  • skills/headhunter/scripts/hh.py: resume plan, resume save, resume pdf; resume checks (Facts, numbers, titles, schools, Glossary names, Chinese in English, words of lacking requirements, start from the positioning); validate checks resumes; candidate show lists them; PDF printing through a headless Chrome, Chromium or Edge, with the text layer's Kangxi radicals mapped back to ideographs
  • skills/headhunter/SKILL.md: the resume format and its checks, the PDF tool and fonts, optional contact in profile.yml, and the Write resumes workflow
  • CONTEXT.md: a Tailored resume starts from the Role profile and cites Facts
  • README.md / README.zh-TW.md: the resume feature and the browser it needs

Related Issues

Closes #5

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Data layout change (existing data folders need migration)
  • Documentation update
  • Refactoring (no functional changes)

Decisions

Item Decision Rejected alternatives
Markdown-to-PDF tool Chrome, Chromium or Microsoft Edge, run headless with a throwaway profile, found in the usual install paths or HEADHUNTER_BROWSER; the script turns the Markdown into HTML itself pandoc with LaTeX: a large install with CJK font setup. WeasyPrint: a pip package plus Pango. Typst or wkhtmltopdf: rarely installed. A Python PDF library: breaks the standard-library-only rule
Font The first installed of Noto Sans TC, Noto Sans CJK TC, PingFang TC, Microsoft JhengHei and Heiti TC, so macOS and Windows need no font install Requiring Noto Sans TC: one more install for most users
PDF text layer After printing, Kangxi radicals in the PDF's ToUnicode maps are mapped back to the ideographs (NFKC), and ligatures are turned off in CSS; radicals with no mapping are reported Leaving it: Chrome's PDF with PingFang TC reads 小, 工, 人, 大, 士, 用, 示, 至, 金 as radicals (⼩, ⼯, …) and "Certified" as "Certified", so copied text and applicant tracking systems miss keywords such as 工程師
Who writes and who checks The agent writes each line in both languages and lists its Facts; the script renders names from profile.yml and glossary.yml, headings and skills, and refuses anything it can check Free Markdown from the agent: nothing would be checked
Traceability Every line except headings ends with <!-- f-003 --> (or <!-- profile --> for the header); the comments are stripped from the PDF A separate mapping file: drifts from the text when the Markdown is edited
Numbers Every number in a line must be in the statements or periods of the Facts it cites Trusting the agent: invented numbers are the most damaging resume error
Titles and schools Optional; written only when a cited Fact states the title or school (in either language) and glossary.yml has it Titles from the Role or the Job: they would claim titles the Candidate never held
Requirements the Candidate lacks resume save and resume pdf refuse the labels and aliases of the lacking requirement's Tags and its proposed terms (missing or to-confirm gaps and failed hard requirements), unless a sourced Fact uses the word Only checking the skills list: a bullet could still claim FastAPI
Glossary Companies, titles, schools and the location come from glossary.yml; a Glossary name in one language requires its pair in the other; the English resume may contain no Chinese Translating names per resume: the issue requires the same English names every time
Starting from the Role profile The Application's Evaluation must name a Role whose profile is current, and the summary must cite at least one positioning Fact; resume plan shows the positioning and evidence order to start from Allowing resumes without a Role: the issue says both start from the Role profile, so an Evaluation without a Role needs a Role created first
Contact details Optional contact (email, phone, links) in profile.yml, written in the header Asking for them in each resume: they would differ between resumes
Writing again Refused unless --replace; resume pdf prints edited Markdown again after checking it Overwriting silently

Migration

profile.yml gains an optional contact; existing profiles stay valid without it. Resumes go in applications/<job-id>/, which evaluation save creates. No existing file changes, and the Index schema is unchanged.

Validation

All runs used the fictional Candidates 王小明 c-001 and 林小華 c-002 with the Evaluations from #4 against real Yourator Jobs, in a scratch HEADHUNTER_DATA_DIR outside any repository, on Python 3.9 unless noted, with Google Chrome on macOS. I acted as the agent following SKILL.md, and as the user for answers and Glossary additions.

Preconditions

  • resume plan c-1 j-yourator-39119 → the Role profile senior-backend-engineer is out of date (role.yml changed); rebuild it with role build first (its requirements changed through role refine in [Feature] Job evaluation against Candidates' Roles #4); rebuilt both Role profiles → Every Role profile is current.
  • resume plan c-2 j-jobs-lever-co-91b1946a (evaluated without a Role) → refused, pointing to creating a Role from the Job
  • resume plan c-1 j-yourator-39119 → positioning, evidence order, the Facts the Evaluation cites per requirement, five lacking requirements with their words (FastAPI, Flask, Linux, Git, concurrency, machine learning, system design …), usable Facts by kind (superseded f-004 under "Never use"), the Glossary, and the header

Refusals

  • A faulty resume → 12 problems, nothing written: location missing from the Glossary, a number (8) not in its Fact, a summary citing no positioning Fact, a title (後端工程師) its Fact does not state, a superseded Fact, a number (75%) not in its Fact, a school missing from the Glossary, a skill no Fact has (tool/flask), an unknown Tag, FastAPI from the lacking requirement must-3, Chinese in the English text, and Example Tech written in the Chinese text where the Glossary says 範例科技
  • An English summary saying "Backend engineer" while the Chinese said 後端開發 → glossary.yml names Backend Engineer as '後端工程師' in Chinese; reworded
  • An experience entry with org: 範例金融 → add the company '範例金融' to glossary.yml; used the Glossary name 範例金融股份有限公司, which matches the Facts' short form
  • Saving again without --replace → refused

Resumes written

Application Role Sections PDFs
c-001 × j-yourator-39119 (Profet AI) senior-backend-engineer headline, summary, 2 companies with 7 bullets, a project, education, a certificate, 9 skills zh and en, 1 page each
c-002 × j-yourator-48719 (街口電子支付) data-engineer headline, summary, 3 positions at one company, education, 7 skills zh and en, 1 page each
  • The c-002 resume says Data Engineer: the failed hard requirement (1.9 years against 2) has Tags the Candidate holds, so only its wording, not the title, is refused
  • Wrote c-002's again with --replace on Python 3.13

PDF checks

  • Read all four PDFs page by page: Traditional Chinese renders correctly
  • Text extracted with pypdf: every Markdown line is in the PDF text, with no radicals and no ligature characters in any of the four
  • The same Chinese page printed without the fix → ⼠ ⼤ ⼩ ⼯ ⽤ ⽰ ⾄ ⾦ in the text layer; after fix_pdf_text → none, nothing left over, still one page
  • No temporary HTML file or browser profile is left behind
  • HEADHUNTER_BROWSER=/nonexistent/chrome → HEADHUNTER_BROWSER is '/nonexistent/chrome', which is not a browser that can run; the Chrome path → printed

Hand edits

  • Added an uncited line, a line citing f-099, and Chinese in an English line → validate c-2 and resume pdf name all three; no PDF written
  • Added 熟悉資料庫設計 <!-- f-011 --> and 每週節省 8 小時 <!-- f-003 --> → validate names the number; resume pdf also refuses 資料庫設計 from the lacking requirement must-6
  • Restored the files → resume pdf prints both PDFs; candidate show c-2 lists resumes: zh, en

Checks

Not run

  • Chromium and Edge, and Chrome on Windows or Linux; only Chrome on macOS was tested
  • A machine with Noto Sans TC installed (PingFang TC was used)
  • Loading the skill in a fresh session with claude --plugin-dir .

Checklist

  • No real candidate data in code, examples, fixtures, screenshots or this PR
  • skills/headhunter/SKILL.md, README.md and README.zh-TW.md updated when behavior or data layout changed
  • Migration for existing data folders described (data layout changes only)
  • Self-review completed
  • Documentation updated (if needed)

🤖 Generated with Claude Code

Add tailored resumes for evaluated Applications. The agent writes each
line in both languages with the Facts it comes from; the script checks
it, writes resume.zh.md and resume.en.md, and prints both to PDF with a
headless Chrome, Chromium or Edge.

- hh.py: resume plan/save/pdf; resumes start from a current Role
  profile; refuses inferred or inactive Facts, numbers not in the cited
  Facts, titles and schools not in them, names missing from or
  inconsistent with glossary.yml, Chinese in the English resume, and
  words of requirements the Candidate lacks; validate checks resumes;
  candidate show lists them; the PDF text layer maps Kangxi radicals
  back to ideographs and ligatures are off
- SKILL.md: resume format and checks, PDF tool and fonts, optional
  contact in profile.yml, the Write resumes workflow
- CONTEXT.md: Tailored resume starts from the Role profile
- README.md / README.zh-TW.md: the resume feature and the browser it
  needs

Closes #5

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added area/agent-instructions AGENTS.md, CLAUDE.md, CONTEXT.md and skill instructions area/docs README and contributor documentation type/feature New functionality labels Nov 8, 2026
@codeotter0201
codeotter0201 merged commit 561ead2 into main Nov 8, 2026
1 check passed
@codeotter0201
codeotter0201 deleted the feat/issue-5-tailored-resumes branch November 8, 2026 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/agent-instructions AGENTS.md, CLAUDE.md, CONTEXT.md and skill instructions area/docs README and contributor documentation type/feature New functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Tailored Chinese and English resumes

1 participant