diff --git a/docs/plan-readers.md b/docs/plan-readers.md index 5a5dcfc..1a56235 100644 --- a/docs/plan-readers.md +++ b/docs/plan-readers.md @@ -133,12 +133,25 @@ For one target, the runner: Per-role text leaves the pull. A new stage `detail` runs after `score` in the cascade (`pull, embed, score, detail, embed, score, ...`). It reads the text of the highest-scored roles without text first, 200 per board per run, and drops the vector of each role it fills so the next `embed` encodes it with the text. The feed ranks titles first and gets the text for the top roles. +### Seniority: stated, then the model + +43% of open roles have a level, all taken from title words. A sample of 59 without a level was 85% individual contributors. Personio, SmartRecruiters, Recruitee and Jobylon state a level that nothing reads. `extract` has never run. + +A role keeps three sources of a level, and the displayed `roles.seniority` is the first that is filled, in this order: + +1. `seniority_model`: the model's verdict, from `extract` run as an afterburner. It reads roles whose model value is empty. The prompt includes the stated and title values as hints, and the model may overrule them. +2. `seniority_stated`: the host's own word, mapped to the app's vocabulary (`app.seniority.SENIORITIES`) by a table per reader in `_shared.py`. The raw word stays in `raw`. A word the table does not know maps to empty and is logged, so the table can grow. +3. `seniority_title`: `seniority.from_title`, as today. + +The filters read `roles.seniority`. A later comparison of stated and model values measures how far each host can be trusted. + ## Decisions taken by the owner, 2026-09-30 1. **Filters** come from the agents that are switched on. Favourite companies are read across the `require` reach (Europe), and a board can override its filter. 2. **robots.txt** is decided per reader at build time. Nothing checks it at run time. Jobindex is read in full. 3. **Places** are a list per role. Copies per place are folded, each keeping its own link. Places and companies become symbols with aliases. 4. **A teaser is kept.** A short description in the list (Phenom and Oracle: 1,066 roles, plus Jobindex and Adzuna excerpts) goes into `Row.teaser` and `roles.teaser`. Until the full text arrives, it is shown and embedded, and a reader that sees one must hand it over. When the full text arrives, it replaces the teaser for embedding and the vector is dropped, as today. +5. **Seniority** has a stated value from the plugin and a model value from an afterburner that fills what is empty and may overrule it. ## Work packages @@ -149,12 +162,13 @@ Each package owns the files listed and their tests. The planner makes each workt | A Contract | Opus | rename `atshosts` to `readers`; `_contract.py` with `Reads`, `Filters`, `Fields`, `Ask`, `Place`, `Row` (with `places`, `teaser`), `problems()`; the extended docstring with the robots.txt rule; a conformance test over every module (declaration against functions, `places="many"` and teaser fixtures) marking today's gaps `xfail` per module | `plugins/readers/__init__.py`, `_contract.py`, `_shared.py`, every `import` of `atshosts`, `tests/test_readers_contract.py` | | | B Runner | Opus | `_runner.py` out of `ats.py`; runtime robots.txt check removed; `Ask` from params; series union; sweep; closing guards; `ats.py` and `search.py` thin; `raw` built from every stated `Row` key | `plugins/ats.py`, `plugins/search.py`, `plugins/readers/_runner.py`, `app/jobs/pull.py`, `tests/test_ats.py`, `tests/test_search.py`, `tests/test_pull.py` | A | | C Providers | Sonnet | `jobindex.py`, `adzuna.py`, `platsbanken.py` as reader modules with teaser and places; `search_params` built from the declarations | the three modules, `app/jobs/sources.py`, their tests | A | -| D1 Hosts a to l | Sonnet | `READS`, all places, teaser, host-stated seniority, date trust in `fields`, robots decision string for Ashby to Lever | those modules and tests | A | +| D1 Hosts a to l | Sonnet | `READS`, all places, teaser, host-stated seniority mapped to `seniority_stated`, date trust in `fields`, robots decision string for Ashby to Lever | those modules and tests | A | | D2 Hosts o to w | Sonnet | the same for Oracle to Workday | those modules and tests | A | -| E1 Places and teaser storage | Opus | `places`, `place_aliases`, `role_places`, `roles.teaser`, migration seeded from the dictionaries in code; `upsert_role` writes them; gates and the Place filter as joins over the tree; `TRUSTED_POSTED_HOSTS` removed; embed falls back to the teaser | `app/storage/*`, `app/models.py`, `app/places.py`, `app/jobs/embed.py`, their tests | A | +| E1 Places and teaser storage | Opus | `places`, `place_aliases`, `role_places`, `roles.teaser`, the three seniority columns, migration seeded from the dictionaries in code; `upsert_role` writes them; gates and the Place filter as joins over the tree; `TRUSTED_POSTED_HOSTS` removed; embed falls back to the teaser | `app/storage/*`, `app/models.py`, `app/places.py`, `app/jobs/embed.py`, their tests | A | | F Reach and filters | Opus | reach from the agents and favourites into `Ask`; `facets` and `Ask` for SmartRecruiters, Eightfold, Workday, SuccessFactors, Phenom, Oracle; board override on the Companies page; each reader's declaration shown on the Sources page | `app/jobs/reach.py`, those six modules, `app/web/api.py`, `app/static/companies.js`, `app/static/sources.js` | B, D1, D2, E1 | | G Detail stage | Sonnet | `detail` as its own stage, ordered by score; cascade order | `app/jobs/detail.py`, `app/jobs/cascade.py`, `app/jobs/stages.py`, their tests | B | | E2 Copies and place list | Sonnet | `dupes.py` folds copies per place into one role with per-place links; the reader shows the place list with links; the teaser is shown when there is no text | `app/dupes.py`, `app/static/roles.js`, `app/templates/*`, their tests | E1 | +| I Seniority | Sonnet | `seniority_stated`, `seniority_model`, `seniority_title` and the precedence; `extract` as an afterburner over roles without a model value, with the hints | `app/seniority.py`, `app/jobs/extract.py`, their tests (the columns come from E1) | E1 | | H Companies as symbols | Sonnet | `company_aliases`, alias folding on insert and lookup, empty enrichment columns | `app/storage/*` after E1, `app/jobs/sources.py` after C, their tests | E1, C | -Order: A first. Then B, C, D1, D2 and E1 in parallel. Then F, G, E2 and H in parallel. After the merges, the planner attaches Infineon and Microsoft on Eightfold with a country filter, updates `plugins/README.md`, and folds this plan into `decisions.md`. +Order: A first. Then B, C, D1, D2 and E1 in parallel. Then F, G, E2, H and I in parallel; H adds a migration after E1's. After the merges, the planner attaches Infineon and Microsoft on Eightfold with a country filter, updates `plugins/README.md`, and folds this plan into `decisions.md`.