Skill v1.0.1
Automated scan100/100+2 new
version: "1.0.1" name: location-enrichment description: Standardize positions.location free-text into structured loc_/work_/role_family columns BEFORE marking any position as checked. Covers 10 special cases (Europe Remote, Italy+remote, multi-location, US-entity-in-EU). Enforces one-position-at-a-time, peer-aligned vocabulary, never-NULL work_country. Use whenever the Analyst is about to set status=checked on a position. allowed-tools: Bash(python3 ), Bash(jq ), WebSearch
location-enrichment — location + role_family structuring playbook
The Analista fills 11 columns of the positions table BEFORE marking status=checked. Never leave a position checked without location enrichment.
The 11 columns to fill
role_family text semantic category of the roleloc_city text office city (NULL if country only)loc_region text region/state (optional)loc_country text physical office country (NULL if continent only)loc_country_code text ISO-3166 alpha-2: IT, IE, HU, ...loc_continent text Europe | Asia | Americas | Africa | Oceaniawork_mode text onsite | hybrid | remotework_country text contracting country (the signing entity) — NEVER NULLwork_country_code text ISO-2 of work_countryis_multi_location bool true if the JD lists several cities/countrieslocation_notes text analyst free-text notes
Behavioural RULES (CRITICAL — sim 1-2 found problems here)
R1 — One position at a time (NO BATCH)
Process your range one position per turn: read the JD → reason → db-update → status=checked → next. Do NOT load 20+ JDs in a single LLM turn. Exception: 3-5 trivial cases with no web search (e.g. "Dublin, Ireland" + hybrid).
Why: a 17k+ token batch (sim 1) produces generic responses ("multi-location + remote + EU") instead of data specific to each record. And the other analysts spin idle during your mega-turn.
R2 — Peer DB taxonomy lookup (every 5-10 records)
BEFORE picking a role_family value, check what your colleagues have used:
python3 /app/shared/skills/db_query.py raw \"SELECT role_family, COUNT(*) AS n FROM positionsWHERE role_family IS NOT NULLGROUP BY role_family ORDER BY n DESC"
If you find a semantically equivalent family, ALIGN to their name. Wrong examples seen in sim 1:
✗ "Translation / Localization" vs "Localization / Language Quality"vs "Language / Localization" → only one✗ "Customer Support" vs "Customer Success / Technical"vs "Technical Support" → only one✗ "Technical Engineering" for a Technical Writer → wrong
If the position really is a new category, note why in location_notes.
R3 — work_country fallback (NEVER NULL on checked)
If after 2 web search attempts you cannot establish work_country with confidence, do NOT leave it NULL. Proceed:
- Country of the posting board (e.g. linkedin.it → IT) + note
"work_country inferred from posting board (low confidence)"
- Country mentioned in the JD as "region" / "office" even if it is not the legal seat
- Last resort: the
loc_continentas a placeholder + note
"work_country=Europe placeholder, entity unverified"
R4 — Peer DB city lookup (BEFORE writing loc_city)
Exactly like R2 for role_family, but for cities. BEFORE writing loc_city, check which form your colleagues have already used for that country, so you don't create a duplicate in another language (Rome vs Roma, Milan vs Milano):
python3 /app/shared/skills/db_query.py raw \"SELECT loc_country, loc_city, COUNT(*) AS n FROM positionsWHERE loc_city IS NOT NULLGROUP BY loc_country, loc_city ORDER BY loc_country, n DESC"
- If the city is already present in one form → ALIGN to it
(as long as it respects the "English exonym" standard, see below).
- If you see a duplicate in a different language already in the DB
(e.g. both Roma and Rome exist), use the English form and note in location_notes which form has to be consolidated.
Writing standard
Countries (loc_country / work_country)
| Yes ✓ | No ✗ | |
|---|---|---|
Italy | Italia, IT, Italie | |
United Kingdom | UK, Great Britain, England | |
Czechia | Czech Republic | |
Netherlands | Holland, The Netherlands | |
Székesfehérvár | Szekesfehervar (always preserve the diacritics) | |
ISO-2 IT, IE, HU, NL, DE, GB, US, ES | ISO-3, lowercase |
Cities (loc_city) — ENGLISH exonym when one exists
Single rule: always write the English form of the city when a settled exonym exists. If the city does NOT have an English exonym, use the local name preserving the diacritics. This aligns the Analista with the Scout's dedup map (_CITY_SYNONYMS in shared/skills/db_insert.py) and eliminates the Rome/Roma, Milan/Milano duplicates.
| Yes ✓ (EN exonym) | No ✗ (local form) | |
|---|---|---|
Rome | Roma | |
Milan | Milano | |
Naples | Napoli | |
Turin | Torino | |
Florence | Firenze | |
Venice | Venezia | |
Genoa | Genova | |
Munich | München, Monaco di Baviera | |
Cologne | Köln | |
Vienna | Wien | |
Prague | Praha | |
Brussels | Bruxelles | |
Lisbon | Lisboa | |
Plzeň (no exonym → local + diacritics) | Plzen |
If you are unsure whether a settled exonym exists, apply the peer DB lookup (R4) and align to the form already present for that city.
Special cases (standard decision)
A — "Europe Remote" / "EMEA - Flexible" / "Remote"
loc_city = NULLloc_country = NULL # no physical country boundloc_continent = "Europe" # only if the area is explicitwork_mode = "remote"work_country = <web search company HQ → fallback R3>is_multi_location = falselocation_notes = "Remote within EU"
B — "Italy" / "Spain" + full_remote (country + remote)
loc_country = "Italy"loc_country_code = "IT"loc_continent = "Europe"work_mode = "remote"work_country = "Italy" # same country, IT contractwork_country_code = "IT"
C — "Dublin, Ireland" + hybrid (clean city+country)
loc_city = "Dublin"loc_region = "Leinster" # optionalloc_country = "Ireland"loc_country_code = "IE"loc_continent = "Europe"work_mode = "hybrid"work_country = "Ireland"work_country_code = "IE"
D — Multi-location, same country ("Barcelona / Malaga")
loc_city = NULLloc_country = "Spain"loc_country_code = "ES"loc_continent = "Europe"work_mode = "hybrid"work_country = "Spain"is_multi_location = truelocation_notes = "Barcelona or Málaga (candidate chooses)"
E — Multi-country ("Amsterdam, Berlin, London, Remote-Europe")
loc_city = NULLloc_country = NULLloc_continent = "Europe"work_mode = "hybrid" # or remotework_country = <company HQ via web>is_multi_location = truelocation_notes = "EU multi-country: NL, DE, GB + remote option"
F — Vague metropolitan area ("Greater Bologna Metropolitan Area")
loc_city = "Bologna" # promote to the main cityloc_country = "Italy"location_notes = "Bologna metropolitan area (~30km radius)"
G — US company with an EU entity hiring in Spain
loc_country = NULLloc_continent = "Europe"work_mode = "remote"work_country = "Spain" # local entity that signslocation_notes = "US company (X Inc.), hires through ES entity"
H — The JD pins down a city the scout had generalized
The Scout had written "Italy" → the JD text specifies "Milano HQ": promote to city.
loc_city = "Milan"loc_country = "Italy"location_notes = "JD specifies Milan HQ (scout had 'Italy')"
I — Abbreviated city ("Dublin 2")
loc_city = "Dublin"loc_region = "Dublin 2" # district goes in region
J — Job-board-only company (Railsware, Top Remote Talent, etc.)
When the company is a distributed outfit with no clear HQ: apply the R3 fallback (posting board country) + note it.
Absolute prohibitions
- ❌
loc_country = "Europe"or"EMEA"— that is a continent, not a country - ❌ Mapping "EMEA" to "Europe" without checking (it includes Middle East + Africa)
- ❌
work_country = NULLon acheckedposition (breaks the salary UI) - ❌ Inventing a role_family when colleagues have already used similar ones → see R2
- ❌ Writing
loc_cityin the local language when the English exonym
exists (Roma, Milano, Napoli → use Rome, Milan, Naples) or without the peer DB lookup → see R4 + city table
- ❌ Loading your whole range as one batch → see R1
- ❌ `loc_city = "Remote" / "Anywhere" / "Distributed"` — those are NOT cities.
If the position is full-remote with no specific city, loc_city = NULL. Bug observed in sim 4: A2 wrote loc_city='Remote' on 8 records (Canonical, Miratech, Link Group, etc.). Always fix it with db_update --loc-city "" (empty string = NULL).
Typical commands
Saving the complete location structure
python3 /app/shared/skills/db_update.py position <ID> \--loc-city "Dublin" \--loc-region "Leinster" \--loc-country "Ireland" --loc-country-code "IE" \--loc-continent "Europe" \--work-mode "hybrid" \--work-country "Ireland" --work-country-code "IE" \--is-multi-location false \--role-family "Technical Writing" \--location-notes ""
Peer taxonomy lookup (run it every 5-10 records)
python3 /app/shared/skills/db_query.py raw \"SELECT role_family, COUNT(*) AS nFROM positions WHERE role_family IS NOT NULLGROUP BY role_family ORDER BY n DESC"
Promotion to checked (ONLY after complete enrichment)
python3 /app/shared/skills/db_update.py position <ID> --status checked \--notes "ESPERIENZA: ... \\n LINGUA: ... \\n SENIORITY: ..."