From ca199976ad9f6be1a2a6881da9955b48b510c567 Mon Sep 17 00:00:00 2001 From: jeromehardaway Date: Thu, 15 Oct 2026 16:49:53 -0400 Subject: [PATCH] feat(resume-market-scorer): Replace a person's pool entry on re-score Keyed by a hash of the person's folder name, so the pool holds one latest score per person per lane and never a name. Notes the pool in sources.md. Part of #27. --- skills/resume-market-scorer/references/pool.json | 5 +++-- skills/resume-market-scorer/references/sources.md | 7 +++++++ skills/resume-market-scorer/scripts/score_skills.py | 9 ++++++--- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/skills/resume-market-scorer/references/pool.json b/skills/resume-market-scorer/references/pool.json index b568950..2786fd9 100644 --- a/skills/resume-market-scorer/references/pool.json +++ b/skills/resume-market-scorer/references/pool.json @@ -1,12 +1,13 @@ { - "_note": "Reference pool of real composite scores per lane (VWC). Scores only: no names, no resume text. One entry per person per lane, latest version. Bands are percentiles of this pool; Competitive = above the lane median, the line NYC Local Law 144 audits use (6 RCNY 5-301).", + "_note": "Reference pool of real composite scores per lane (VWC). Scores only: no names, no resume text; id is a hash of the person's folder name so a re-score replaces their entry. One entry per person per lane, latest version. Bands are percentiles of this pool; Competitive = above the lane median, the line NYC Local Law 144 audits use (6 RCNY 5-301).", "software": [], "data": [], "ml": [], "ai": [ { + "id": "9c3125a00806", "score": 67.7, "scored": "2026-10-14" } ] -} \ No newline at end of file +} diff --git a/skills/resume-market-scorer/references/sources.md b/skills/resume-market-scorer/references/sources.md index 8df2473..51f4fce 100644 --- a/skills/resume-market-scorer/references/sources.md +++ b/skills/resume-market-scorer/references/sources.md @@ -28,3 +28,10 @@ BLS refuses requests without a contact email in the User-Agent; use the email of Lane → occupation (`LANE_ONET` in `fetch_postings.py`, verified with `--search` on 2026-10-15): software 15-1252.00 Software Developers · data 15-1243.00 Database Architects · ml 15-2051.00 Data Scientists · ai 15-1252.00 Software Developers. AI and ML engineer roles have no O*NET occupation of their own. + +## Reference pool (references/pool.json) +Real composite scores per lane, nothing else: no names, no resume text, no what-ifs or test runs. Each entry is +keyed by a hash of the person's `~/resume-scores/` folder name, so `--add-to-pool` replaces that person's +earlier score instead of appending. Bands are percentiles of the lane's pool: Competitive is above the median, +the line NYC Local Law 144 bias audits draw (6 RCNY 5-301). Under 20 scores a lane reports rank only ("above N +of M"), and the skill works the same either way. diff --git a/skills/resume-market-scorer/scripts/score_skills.py b/skills/resume-market-scorer/scripts/score_skills.py index 93a8d76..52a9a7f 100644 --- a/skills/resume-market-scorer/scripts/score_skills.py +++ b/skills/resume-market-scorer/scripts/score_skills.py @@ -8,7 +8,7 @@ postings.json must come from fetch_postings.py, unedited, under 14 days old. The resume, its text and the report must live outside any git repo. The formula is fixed; it never changes per person. """ -import argparse, json, os, re, sys +import argparse, hashlib, json, os, re, sys from datetime import datetime, timezone from fetch_postings import LANE_ONET, REF, digest, matchers import score as onet_scorer @@ -251,7 +251,7 @@ def main(): ap.add_argument("--text", help="the resume as plain text; every evidence quote must appear in it") ap.add_argument("--onet", required=True, help="onet.json from fetch_market.py") ap.add_argument("--out") - ap.add_argument("--add-to-pool", action="store_true", help="record this score in references/pool.json (real resumes only, once per person)") + ap.add_argument("--add-to-pool", action="store_true", help="record this score in references/pool.json (real resumes only; replaces this person's entry)") a = ap.parse_args() p = json.load(open(a.postings)) check_postings(p) @@ -288,7 +288,10 @@ def main(): pool = json.load(open(POOL)) rep["pool"] = pool_band(rep["score"], [x["score"] for x in pool[rep["lane"]]]) if a.add_to_pool: - pool[rep["lane"]].append({"score": rep["score"], "scored": rep["fetched_at"][:10]}) + # one entry per person per lane: the key is a hash of the person's folder name, never the name itself + key = hashlib.sha256(os.path.basename(os.path.dirname(os.path.abspath(a.resume))).encode()).hexdigest()[:12] + pool[rep["lane"]] = [x for x in pool[rep["lane"]] if x.get("id") != key] + pool[rep["lane"]].append({"id": key, "score": rep["score"], "scored": rep["fetched_at"][:10]}) json.dump(pool, open(POOL, "w"), indent=1) # Never advise cutting a tool O*NET counts as common (Git), even when this lane's postings take it for granted common = [t["skill"] for t in onet_raw["tech_skills"] if t["posting_pct"] >= CUT_PCT]