From 779b136757527a4c269a0f5c313bb3dbb2c1cb40 Mon Sep 17 00:00:00 2001 From: Wolf Date: Wed, 30 Sep 2026 09:16:29 +0200 Subject: [PATCH] Plan readers: listing run and enrich run, and what triggers the enrich run Co-Authored-By: Claude Opus 5.5 --- docs/plan-readers.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/plan-readers.md b/docs/plan-readers.md index 1a56235..039c9c1 100644 --- a/docs/plan-readers.md +++ b/docs/plan-readers.md @@ -131,7 +131,12 @@ For one target, the runner: 6. Decides completeness from the declaration, and applies the guards on closing: a filtered read closes roles outside the filter, except roles with a vote, an application or a note. A filtered or `empty="suspect"` read that returns under 10% of the last count counts as failed. 7. Records failures (`failing` since and reason, 21 days to close), 429 handling and waits, as today. -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. +The runner makes two runs (owner, 2026-09-30): + +1. **Listing run** (the pull). The agents hand the reach to the runner. The runner calls each reader with its filters and handles paging and sweeps. Readers return standard rows, with every place of a role. Then `dupes.py` folds copies, and `embed` and `score` run. +2. **Enrich run** (new stage `enrich`). After scoring, the runner is handed the ranked roles. For each role that still needs a call (text through `detail`, and later other per-role facts), it fetches the highest-scored first, within a budget per board and per run. It drops the vector of each role whose text improved, and `embed` and `score` run again for those roles only. + +The enrich run follows every rescore that changes the ranking materially: new roles from a pull, an agent created or edited, a company starred or unstarred. A vote on a role does not trigger it. A role never scored above the agents' thresholds gets no extra call. That is the budget which keeps the enrich run from reading every board in full. ### Seniority: stated, then the model @@ -166,7 +171,7 @@ Each package owns the files listed and their tests. The planner makes each workt | 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`, 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 | +| G Enrich run | Opus | `enrich` as its own stage over the ranked roles, highest score first; triggered after a pull's scoring, after an agent is saved and after a star changes, not after a vote; re-embed and rescore only the roles it filled | `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 |