# Plan: seniority as a ladder with two tracks, filtered by range Planned 2026-09-30. It is folded into `decisions.md` and deleted when it lands. ## What the owner asked for 1. **Seniority is real seniority, not only management.** A Principal Solutions Engineer is very senior, and a Staff engineer is on a par with a manager. The filter must rank individual contributors and people leads on one ladder. 2. **A range instead of level buttons**, e.g. "at least Staff", while still allowing a search for manager roles only, as opposed to senior individual contributor roles. The owner agreed on 2026-09-30 to the ladder below, including Principal one rung above Staff and "Marketing Lead"-style titles as individual contributors. ## Where it stands `roles.seniority` is one of intern, junior, mid, senior, staff, lead, manager, director, exec. Read as a ladder, it puts a Principal below a Team Lead. Open roles on 2026-09-30: | Level | Roles | What it holds | |---|---|---| | staff | 1,589 | 1,115 Staff, 224 Senior Staff, 495 Principal, 18 Senior Principal | | lead | 1,398 | 206 team leads and supervisors, 72 tech leads, the rest "Lead X" and "X Lead" | | manager | 1,109 | 258 Senior Managers, 360 Engineering Managers | | director | 1,002 | 633 Director, 362 Head, 35 Associate Director | | none | 11,046 | 49% of 22,314 | `extract` has given a model level to 495 roles. No agent has a seniority gate. ## Design **The ladder** is in `app/models.py` on main (step 0, done): `SENIORITIES`, `LEVELS`, `RUNGS`, `TRACKS`, `LADDER` and `levels_between(low, high, track)`. | Rung (`RUNGS`) | Individual contributor (`ic`) | People lead (`people`) | |---|---|---| | intern, junior, mid, senior | the level itself, no track | | | staff | `staff`: Staff, Tech Lead, Lead X, X Lead | `lead`: Team Lead, Supervisor, Teamleiter; `manager` | | principal | `principal`: Principal, Senior Staff | `senior_manager`: Senior Manager, Associate Director, AVP | | distinguished | `distinguished`: Senior Principal, Distinguished, Technical Fellow, SAP Chief Expert | `director`: Director, Head of, Leiter | | exec | | `exec`: VP, C-level, Managing Director | `lead` changes meaning, from any lead to a team lead. Rungs below `staff` have no track and pass either track filter. `roles.seniority` stays one column of words, so gates, `extract` and the host tables keep working on words. The range and the track become a list of words in `levels_between`, and the store's `seniority IN (...)` filter is unchanged. **Titles** (`app/seniority.py`). Highest rung wins, as today. On the same rung, people wins over individual contributor, and an individual-contributor grade on a people title lifts it one rung only when the grade is above the title's own rung: - "Staff Engineering Manager" is `manager`. - "Principal Engineering Manager" is `senior_manager`. - "Principal Product Manager" is `principal`, since a product manager is an individual contributor. - "Senior Staff Engineer" is `principal`, and "Senior Principal" is `distinguished`. - "Associate Director" and "Assistant Vice President" are `senior_manager`. "Senior Director" is `director`. - "Fellow" alone is academic ("Research Fellow", "Postdoctoral Fellow"), so it stays unknown. "Technical Fellow" and "Engineering Fellow" are `distinguished`. - "Lead Engineer", "Tech Lead", "Marketing Lead" and "Payroll Lead" are `staff`. "Team Lead", "Supervisor", "Shift Leader", "Teamleiter", "chef d'équipe" and "Assistant Store Manager" are `lead`. **Mapping again.** `app/prep/stage.py` `VERSION` goes to 2, so the next prep maps every open role again with the new title rules. A migration clears `seniority_model` where it is `staff`, `lead`, `manager` or `director`, since those words split and `extract` reads a role again once its model level is empty. It then sets `roles.seniority` to the first of model, stated and title, as `Store.write_prep` does, so the feed never shows a word the filter does not know. Take the next free migration number when merging, since another session adds migrations too. **Filter.** `GET /api/roles` and `/api/roles/facets` take `level_from`, `level_to` (names in `RUNGS`) and `track` (`ic` or `people`) instead of repeated `seniority`, plus `seniority_unknown` as today. `_feed_filters` turns them into `seniority=levels_between(...)`. A bad name is a 422 sentence. The facets keep counting per level word; the rail sums them per rung for the chosen track. **Rail.** The Seniority block becomes: - **From** and **to**, two native selects of the rungs with counts. The rung label follows the track: Staff / Manager, Principal / Senior Manager, Distinguished / Director with both, the side's own name with one. - **Track:** a three-button group, Both, Individual, People, as the existing `.seg` group. - **"and roles with no level"** shown once a bound or a track is set, as today. The ladder reaches `roles.js` from the page (`pages.py` passes `RUNGS` and `LADDER` as JSON), so the words live in `models.py` only. An old address with `seniority=` is ignored. ## Work packages | WP | Model | Builds | Owns | Needs | |---|---|---|---|---| | 0 Ladder | planner | `SENIORITIES`, `RUNGS`, `TRACKS`, `LADDER`, `levels_between` in `app/models.py`; the coverage test of `tests/test_seniority.py` marked xfail until A | done on main | | | A Levels | Opus | Title rules for the new words and the split of `lead`, with the titles above as cases; host tables (Jobylon "lead" is `staff`, check Personio, SmartRecruiters, Recruitee); `extract`'s prompt describing the ladder and its tracks; prep `VERSION` 2; the migration; the xfail marker removed | `app/seniority.py`, `app/prep/hosts/*.py`, `app/prep/stage.py`, `app/jobs/extract.py`, `app/storage/schema.py`, `tests/test_seniority.py`, `tests/test_prep*.py`, `tests/test_extract.py`, `tests/test_storage.py`, `tests/test_ats_*.py` | 0 | | B Range | Sonnet | `level_from`, `level_to`, `track` in `app/web/api.py`; the ladder in the page (`app/web/pages.py`, `app/templates/roles.html`); the rail's From, To and Track in `app/static/roles.js` and `app/static/app.css`; tests in `tests/test_web.py`; a screenshot at 390 px and at desktop width | those files | 0 | A and B share no file and run in parallel. They merge in the order A, then B. The planner then runs `app prep` on the live database, checks the counts per rung, folds this plan into `decisions.md` and deletes it.