Skip to content

feat(evaluation): evaluate Jobs against Candidates' Roles - #16

Merged
codeotter0201 merged 1 commit into
mainfrom
feat/issue-4-job-evaluation
Nov 8, 2026
Merged

codeotter0201 merged 1 commit into
mainfrom
feat/issue-4-job-evaluation

Conversation

@codeotter0201

Copy link
Copy Markdown
Owner

Summary

Implements Job evaluation from #4: find the Candidates whose Roles fit a Job, evaluate a Candidate under the Role that fits (or against all of their Facts when none does), and write an Evaluation with a Fit score, reasons tied to Facts and Job requirements, gaps and risks, and a Success rating.

  • skills/headhunter/scripts/hh.py: evaluation match, evaluation save, evaluation list, role refine; Evaluations in validate, candidate show and the Index (evaluations, evaluation_gaps); the Index rebuilds itself when its schema version changes; role build and evaluation save share the evidence and gap checks
  • skills/headhunter/SKILL.md: the evaluation.md format, how each rubric dimension is scored, the Success rating mapping, the Evaluate Jobs workflow (finding Candidates, choosing the Role, hard requirements, no fitting Role, refining Roles)
  • CONTEXT.md: Evaluation names its Role; adds Fit score and Hard requirement; Success rating comes from both
  • README.md / README.zh-TW.md: the Job evaluation feature

Related Issues

Closes #4

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
Who scores The agent judges each requirement (evidence, gaps, hard requirements, achievements, conditions, each with why); the script works out every dimension score, the Fit score and the Success rating The agent writing scores: unchecked and inconsistent across Evaluations
Referring to Job requirements By position: must-1, nice-1, duty-1 Adding ids to Job snapshots: changes the #12 format and every saved snapshot
Evidence and gaps The same shape and checks as Role profiles, with the same gap kinds (missing, to-confirm, weak-evidence); the code is shared A second format for the same judgment
Skill overlap Share of the requirements that are not hard requirements with sourced evidence; must-haves count twice; self-reported evidence counts and stays a weak-evidence gap Weighting by evidence level: most resumes are self-reported, so almost every Candidate would score low
Hard requirements Only must-haves. years: the periods of the cited experience Facts are added up and compared with min_years. Other kinds fail only with met: false and the Facts that show it. With no sourced Fact a hard requirement is unconfirmed: a gap, gate unconfirmed, rating not lowered Treating unconfirmed as failed: missing data would read as a failing Candidate. Comparing total years: "2 years of data engineering" would count analyst years
Gate Failing any hard requirement lowers the rating by one level, once; low stays low One level per failed requirement: the rubric says "by one level"
Seniority Steps between the Job's level and seniority in profile.yml: 100 / 60 / 30 / 0, labeled under- or over-qualified The Role's target level: it says what the Candidate wants, not what they are
Industry and domain 100 when an active, sourced Fact shares one of the Job's industry Tags, 60 for a shared domain Tag only, 0 otherwise Agent judgment: unchecked
Achievement evidence Duties matched by an achievement or project Fact with a result, out of three (or all duties when fewer); requirements stand in when a Job lists no duties Share of all duties: postings list five to eight, so strong Candidates scored low
Salary, location, work mode The agent rates each match / partial / mismatch / unknown with why; unknown counts 50 Parsing salary text: postings write it as 面議, monthly, yearly or ranges
Success rating bands 75 and above high, 55 to 74 medium, below 55 low Bands without a fixed mapping: ratings would not be comparable
Choosing the Role evaluation match ranks each Candidate's active Roles by shared must-have Tags, then shared Tags; the agent chooses; a dropped Role is refused The script picking the Role: Tag counts miss title and level
No fitting Role The Evaluation leaves role out, says so, and the agent offers to create a Role from the Job with role new A command that drafts a Role from a Job: the agent already writes it from the snapshot
Refining Roles role refine proposes Tags required by two or more Jobs evaluated under the Role that no requirement has (must-have when at least half of those Jobs list it as one), and adds those Jobs to assumed or Job requirements they confirm; --accept applies only what the user accepts Changing role.yml automatically; proposals from a single Job
Evaluating again Refused unless --replace; one Evaluation per Candidate × Job Keeping every version: nothing needs the history yet
status.yml Not written; an Application starts with its evaluation.md, and Stages belong to #6 A minimal status.yml: would fix its format before #6 designs it
Index schema PRAGMA user_version; a different version rebuilds the Index Rebuilding only when files change: an Index from an earlier version would lack the new tables

Migration

Data folders created by #1, #12 and #9 have no applications/; evaluation save creates it with the first Evaluation, so no files change. An existing index.sqlite has no Evaluation tables and schema version 0; the next command that reads it rebuilds it. Tested with the index.sqlite from the #9 walkthrough: version 0 → evaluation list → "No Evaluations." and version 1 with both tables.

Validation

All runs used the fictional Candidates from #1 and #9 (王小明 c-001 with the Role senior-backend-engineer, 林小華 c-002 with data-engineer) in a scratch HEADHUNTER_DATA_DIR outside any repository, on Python 3.9 unless noted. I acted as the agent following SKILL.md, and as the user for answers and approvals.

Real Jobs (from the two sites #12 read for real)

Finding Candidates

  • evaluation match j-yourator-40514 → both Candidates, each Role with shared Tags (7 of 32, 7 on must-haves), profile state and Fact coverage; the dropped Role tech-lead is not listed
  • In a copy with data-engineer paused: c-002 is left out with "Not listed: 1 other active Candidate …"; --all lists it with "no active Role shares a Tag"
  • evaluation match j-yourator-39119 c-1 → Facts per requirement, strongest evidence first, both sides' salary, location and work mode, and duty-1…duty-6

Evaluations (Fit score and rating checked by hand for each)

Candidate × Job Role Fit score Hard requirements Success rating
c-001 × j-yourator-39119 senior-backend-engineer 67 passed (7.8 years against 2) medium
c-001 × j-jobs-lever-co-91b1946a senior-backend-engineer 66 passed medium
c-001 × j-yourator-48767 senior-backend-engineer 31 unconfirmed (Node.js years, language) low
c-002 × j-yourator-25039 data-engineer 52 none low
c-002 × j-yourator-40514 data-engineer 46 unconfirmed, then passed after the follow-up low
c-002 × j-yourator-48719 data-engineer 72 (medium band) failed: 1.9 years against 2 low (lowered from medium)
c-002 × j-jobs-lever-co-91b1946a none fits 36 unconfirmed low
  • A faulty Evaluation (unknown field, dropped Role, superseded Fact, missing why, unknown requirement, hard requirement on a nice-to-have, unaccounted requirements, bad job_level and industries, a skill Fact as an achievement, bad target, bad and unknown conditions, a risk without close, no summary) → all 28 problems listed, nothing written
  • The no-Role Evaluation says "No Role fits this Job, so it was evaluated against all of the Candidate's Facts. A Role can be created from this Job." and evaluation save prints the offer
  • c-001 × j-yourator-48767: Job level mid against senior → "over-qualified by 1"; c-002 × j-yourator-48719: senior against mid → "under-qualified by 1"

Failing a hard requirement

  • Citing the achievement f-011 for "At least 2 years of relevant experience in data engineering" → cite experience Facts with a period so their years can be counted
  • Follow-up answer saved with source add c-2 - --type interview (s-005) and fact add (f-013, experience 2025-01..present) → role stale c-2: data-engineer: new f-013 matches its requirements
  • Saved again → "Fails the hard requirement must-1 …: 1.9 years of cited experience against 2." and "Failing a hard requirement lowers the rating from medium to low."; evaluation save also reported the stale Role profile
  • Saving again without --replace → refused; j-yourator-40514 with --replace → its years requirement (1 year) met, gate passed
  • In a copy, a fictional pasted Job requiring a master's degree, met: false citing the bachelor's degree Fact → fit score 75 (high band) → medium

Refining Roles

  • After two Evaluations under senior-backend-engineer: "2 requirement changes proposed … run role refine"; after three: 10
  • role refine c-1 senior-backend-engineer → 7 Tags to add, each with how many Jobs list it and as must-have, and the Jobs' wording; 3 assumed requirements to cite Jobs
  • --accept tool/linux nosuch → refused, listing the proposals
  • --accept tool/linux skill/performance tool/docker r-004 → r-008…r-010 added with origin: job and their Job ids, r-004 now origin: job with two Jobs; role stale → role.yml changed; the remaining proposals stay listed
  • shasum of every facts.yml, sources.yml and taxonomy.yml before and after → identical

Index, listing and validation

Not run

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 Job evaluation: find the Candidates whose Roles fit a Job, evaluate
one Candidate under the fitting Role (or against all Facts when none
fits), score the fixed rubric with a hard-requirement gate, and write
applications/<job-id>/evaluation.md with reasons tied to Facts, gaps,
risks and a Success rating. Requirements that recur across the Jobs
evaluated under a Role are proposed as role.yml changes and applied only
when the user accepts them.

- hh.py: evaluation match/save/list, role refine; Evaluations in
  validate, candidate show and the Index; the Index rebuilds itself when
  its schema version changes; role build shares the evidence and gap
  checks with evaluation save
- SKILL.md: evaluation.md format, rubric, Success rating mapping and the
  Evaluate Jobs workflow
- CONTEXT.md: Evaluation, Fit score, Hard requirement, Success rating
- README.md / README.zh-TW.md: the Job evaluation feature

Closes #4

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 fc4a4d5 into main Nov 8, 2026
1 check passed
@codeotter0201
codeotter0201 deleted the feat/issue-4-job-evaluation branch November 8, 2026 06:41
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] Job evaluation against Candidates' Roles

1 participant