Commit Graph
31 Commits
Author SHA1 Message Date
WolfandClaude Fable 5.1 b998f4c270 Merge branch 'watchlist'
The search field on Roles takes the phone top bar while it is typed in,
since a third tab left it a few letters wide.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-29 17:00:42 +02:00
WolfandClaude Opus 5.5 51d2537d73 Search roles by company too, link the careers page in the reader, widen the list and reader
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 16:58:51 +02:00
WolfandClaude Sonnet 5.5 7dcb2c1705 Add a Watchlist tab for the companies the app cannot read a board of
Rate each one Yes or No apart from affinity, open its careers page with the
time noted, and set a missing or wrong link in the row. Migration 15 adds
companies.watch and careers_opened_at.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-09-29 16:56:16 +02:00
WolfandClaude Opus 5.5 4e3c3f130e Give a search agent several prompts and score a role by its best one
Migration 14 moves each non-empty agents.intent into agent_prompts as one
prompt named after the agent, with its cached vector, and drops the three
intent columns. A role's fit is the maximum over the agent's prompts of the
calibrated cosine, and scores.prompt names the prompt that won. The agents
API takes prompts and still takes intent; the role endpoint serves the
agent's score and prompt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 16:19:57 +02:00
Wolf 562fa3ab09 Merge branch 'r2-backend'
# Conflicts:
#	app/storage/schema.py
2026-09-29 15:22:03 +02:00
Wolf bbb7474cef Merge branch 'r2-salary' 2026-09-29 15:09:19 +02:00
WolfandClaude Sonnet fa4e1a657f Keep a board's stated pay as salary_text, even when it does not normalise
Every ats parser now writes one human-readable pay line whether or not it
converts to yearly salary_min/salary_max/currency: hourly and daily rates,
Greenhouse's several pay zones, and a range with no currency all survive as
text instead of being dropped outright. Stored in roles.salary_text
(migration 12), replaced whole on every pull like title, so a board that
stops stating pay clears it rather than leaving a stale line. salary_state
is derived, not stored ('normalised', 'stated', or ''), and is what the
feed's new Pay filter and badge read; gates and scoring are unchanged, still
reading only the normalised columns.

Co-Authored-By: Claude Sonnet <noreply@anthropic.com>
2026-09-29 15:08:45 +02:00
WolfandClaude Opus 2c4b992c50 Country lookup: every ISO country, the widest unit wins, several European countries are EU
country_of folds with _place_fold (ł, đ, ø, æ map to ASCII; _fold keeps building
company_key unchanged), knows every ISO country by English name and European
ones by their own, and the cities among the 150 most frequent unresolved
places on the live data. Within one location a country beats a US state or
Canadian province, which beats a city. A state code that is also an ISO code
counts as the state only when the line names a US place. Several countries,
all European, are EU; otherwise ''. A code in parentheses is read when no
name matched.

Migration 12 recomputes country from place for roles extract has not read
and whose board sent no country in raw. On the live data: open roles with no
country 2,827 -> 1,183 of 16,841; 1,705 open roles change, 48 from a code.

Co-Authored-By: Claude Opus <noreply@anthropic.com>
2026-09-29 15:06:15 +02:00
WolfandClaude Opus b021838959 Calibrate fit and taste per embedding model instead of min-max per run
scale() maps a cosine to clip((cos - lo) / (hi - lo), 0, 1) with constants
from CALIBRATION in app/config.py, keyed by model and replaceable under
embed.calibration. multilingual-e5-small: fit 0.75..0.88, taste -0.14..0.19
(taste from synthetic votes). An uncalibrated model falls back to min-max
and logs a warning once per run.

The extract and summarise bars default to 0.55 and 0.65, about 300 and 35
roles for the starter agent on the measured data; stored limits are kept.
An agent without an intent is left out of the model-stage scope, and each
score run names such agents in one score.no_intent notice.

Co-Authored-By: Claude Opus <noreply@anthropic.com>
2026-09-29 14:59:34 +02:00
Wolf 706b127bc0 Merge branch 'worktree-agent-afad54f12aef2cccf'
# Conflicts:
#	app/storage/schema.py
#	app/storage/store.py
#	tests/test_storage.py
2026-09-29 14:32:28 +02:00
WolfandClaude Sonnet 5 44ff7c0131 Unpack structured pay from five ATS hosts; fix the function classifier
Part A: Ashby (?includeCompensation=true), Greenhouse (pay_transparency=true,
already free on the list request), Lever (salaryRange), Recruitee (salary)
and Personio (salaryInformation) all give structured pay; Workable and
SmartRecruiters do not (checked live). Every host converts to a yearly
salary_min/salary_max/currency, multiplying a monthly figure by 12 and
skipping an hourly or daily one rather than annualising a number nobody
stated. A range with no currency is ignored, and Greenhouse's own multi-zone
ranges are skipped outright since nothing says which zone the role is at.

Part B: classify() matched substrings, so " it" matched inside "Italy",
filing European sales roles as engineering; it now matches on word
boundaries (full boundary for the handful of short tokens that are
themselves the start of an unrelated word, prefix matching kept for the
stems). Title is checked before department (a hand-checked sample found
title-first right about twice as often), nothing matching returns '' rather
than "other", and a modest set of German/Dutch/Danish/Norwegian/Swedish/
French keywords covers the seed's other languages.

function is not a board field, so it gets the opposite rule from every
other raw column: extract's answer overwrites the classifier's guess
outright, and once extracted_at is set no later pull may put the guess
back. Migration 9 recomputes function for every not-yet-extracted role from
its stored title and department.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 14:29:12 +02:00
Wolf 43773efc53 Merge branch 'worktree-agent-a3bd292551395dda0'
# Conflicts:
#	app/storage/schema.py
2026-09-29 14:16:35 +02:00
WolfandClaude Sonnet 75eca1c914 Date a role by posted_at, not just first_seen
recency and the newest feed both counted from first_seen, when the app
itself first stored a role, so a newly added board's whole backlog scored
as freshly posted for two weeks: 10,223 of 15,415 board roles were posted
more than 30 days before they were first seen (average gap in days: Ashby
78, Greenhouse 143, Lever 226, Personio 333).

Add roles.posted_at (migration 9): the earlier of first_seen and a trusted
host's published_at, where TRUSTED_POSTED_HOSTS (app/models.py) records
which of the ats and search hosts report a creation date rather than one
that moves on an edit, checked against live boards and the live database.
A future or pre-2015 date is not trusted either. upsert_role sets it on
insert and keeps the earliest on update, so an edit on the board can only
move it earlier, never later. recency, the feed's newest order, the "new
since" days filter and _top_scope's tie-break now read posted_at;
first_seen is unchanged and still what the UI shows as when the app found
a role. The row's age in roles.js now shows the posted date instead.

A partial index (posted_at DESC, uid) WHERE closed_at IS NULL serves the
newest feed; sqlite3's bundled build has no STAT4, so its planner
otherwise sorts every open role instead of using it, measured 30x slower
on the live database, so Store.roles() forces it for that query shape.

Co-Authored-By: Claude Sonnet <noreply@anthropic.com>
2026-09-29 14:13:06 +02:00
WolfandClaude Opus 5.5 3b209d628a Every way a company gets a board is set_board, and an unreadable host keeps its slug
`app.jobs.sources.set_board` attaches a board to an existing company,
replaces the one it has (closing the old board's open roles) or creates
the company, with row and subscription changed in one transaction by
`Store.set_company_board`. A board that lists zero roles is kept. `add`,
`discover --add`, the seed importer (moved out of app/cli.py) and the new
`POST|DELETE /api/companies/{key}/board` all go through it; a seed re-run
attaches a board to a row that never had one. A company's subscription is
rewritten in place, and detaching hides it.

`companies.ats_slug` (migration 9) keeps the slug of a host the app
cannot read yet, and discovery returns such a host before probing slugs.
The Companies rows get Set board / Change, the host select is rendered
from `plugins.ats.HOSTS`, and a row with nothing found reads "board not
found" and is in the "Not readable yet" filter.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-29 14:04:52 +02:00
WolfandClaude Fable 5.1 cebe62ddc9 Extract and summarise bounds are each agent's own limits, set on its form
agents.limits holds extract_top, extract_min, summarise_top and
summarise_min; the scope query reads them per ranked row, and a row saved
before this behaves like a fresh agent. The four global config keys go.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-28 16:02:06 +02:00
Wolf 3aee48997c Merge branch 'seed-europe'
# Conflicts:
#	README.md
2026-09-28 15:27:48 +02:00
WolfandClaude Fable 5.1 51d1e67ff9 A European seed of 362 employers, readable or not; discover finds a company's board from its site
The seed was jobhunt-hq's 186 US boards, chosen because they could be read. It is now a hand-picked list of European tech employers, with `board` filled by the new `app.jobs.discover` from each company's own careers site and every board fetched once before it landed: 175 have one, and the rest keep the ATS host their site runs on (Teamtailor 32, Workday 12, SuccessFactors 9, ...) and a careers URL, as rows the app cannot read yet. Companies shows them as "not readable yet" with a link, behind a filter, so the next parser to write is the host that filter shows most.

`app companies discover NAME DOMAIN [--add]` reads the home page, its careers links and the usual paths for a link into a known host, one level down on a careers page, and probes Greenhouse, Lever, Ashby, SmartRecruiters, Recruitee and Personio by slug when the pages link nothing. It is what the LinkedIn flow will call.

Migration 7 adds companies.ats, country and city. The Workable parser now reads the v3 shape its list endpoint actually sends (location object, department list, shortcode and no URL or text); the first populated board showed it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-28 15:27:14 +02:00
WolfandClaude Fable 5.1 7db77e83a3 Extract is bounded to the ranking: pull → embed → score → extract → score → summarise
The free stages run first and their score bounds the two model stages.
Extract reads only the best extract.per_agent roles of each agent at
extract.min_score or more, then score runs again so the gates read what it
filled; summarise gets a min_score of its own. The cascade steps by
position, since score is in it twice.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-28 15:26:58 +02:00
WolfandClaude Fable 5.1 c4f2bcc0c9 Viewing as leads the Roles rail; settings get a rail, agent cards, one Sources section at a time
A search agent is a persona, and every like or pass belongs to the one
being viewed. The rail now opens on Viewing as: a full-width chooser,
the name alone with one agent, a note with none, remembered in the URL
and localStorage. The vote buttons, the reader's affinity control, the
feed, the tag counts and the reader fetch all carry that agent; before,
votes sent none and every one landed on the default agent. Best first
and Newest first are back as the segmented control under Order,
independent of the agent. The rail selects no longer clip descenders:
Chrome ignores line-height on a select, so the fixed box is gone in
favour of padding and a min-height.

Settings render inside a sticky rail (Search agents; Sources with Job
boards, Company boards, Runs, Messages; Account), a strip under the
header on a phone, so Runs is one click away however long the company
list gets. Sources shows one section at a time, chosen by the fragment,
so the old redirects still land. Search agents are cards, newest first:
name, an On/Off switch with its word, the intent in full, the weights,
Edit in place, New agent on top, and a link to Roles as that agent.
Switching one on rescores it.

replace_scores writes nothing for an agent deleted while score was
running, instead of failing the run on the foreign key.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-28 15:05:55 +02:00
WolfandClaude Fable 5.1 c69fb0b6c4 Merge main: read state and tags meet per-agent votes and affinity
The per-agent migration becomes v6 behind main's v5. A vote still stamps
the role's read_at, tag counts hide the agent's hidden companies, and
/api/filters takes the agent like /api/roles.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-28 12:59:41 +02:00
WolfandClaude Fable 5.1 a0772519b3 Per-agent ranking: votes, affinity and a taste term; settings are three sub-tabs
Votes on roles and company affinity move to role_votes and agent_companies,
one row per search agent, so two agents rank the same roles differently. The
score gains taste, the cosine to mean(liked) - mean(passed) of the agent's
votes, as newsdesk ranks articles. The API takes agent on roles, votes and
companies and falls back to the default agent, the enabled one with the
lowest id.

Settings become Search agents (a list again, with New and Delete), Sources
(job boards, company boards and runs with the message log, one section per
plugin) and Account. Old paths answer 301 to their section.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-28 12:53:41 +02:00
WolfandClaude Fable 5.1 a9290a6926 Roles is newsdesk's feed: rail, feed and reader, with read state and tags
The Roles tab takes newsdesk's shell, ported from its index.html and
app.css rather than rewritten: a filter rail (Show read, Best first or
Newest first, first seen, tag chips with counts, the old filters behind a
disclosure), the feed in newsdesk's row layout (score gutter, title,
company, place, badges, age, tags, the summary as excerpt, judge buttons)
and the reader as a third column that replaces the list on a phone. The
router pushes /roles/{uid}, which the server also renders with the reader
open, so the separate read page and role.js go. j/k, u/n/d, S, Enter,
Escape, o, /, f and c work as in newsdesk. The phone rules come with their
comments.

Two things the row lacked: roles.read_at, stamped when the reader opens a
role or a vote is cast, behind include_read on /api/roles; and role_tags,
written by summarise alongside the summary and served with counts by
/api/filters, filtered in SQL before LIMIT. Migration 5.

PyCharm run configurations in .run/ for serve, pull, seed and pytest.
core.autocrlf=input is set locally so a Windows-side checkout commits LF.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-28 12:37:45 +02:00
Wolf 15057ea230 Merge branch 'worktree-agent-a8e1a9fb17fbab9d8' 2026-09-25 21:52:39 +02:00
WolfandClaude Fable 5.1 09c5dde113 Roles as a feed, a read page, votes that move the rank, unstar
The Roles tab is news's feed row: the title opens /roles/{uid}, company,
place and age under it, the badges, a one-line excerpt (summary, else the
description's opening), and ▲ ● ▼ ★ on the right, under the text at 640px.
The company affinity control leaves the row. A passed role and a hidden
company's are dimmed and stay. The filter bar is one row: order, search and
a Filters <details> holding the rest, with a judged select and "Show hidden
companies". The list loads 60 and appends on an IntersectionObserver
sentinel; back from a read page restores the filters, rows and scroll.

GET /api/roles takes offset, defaults to 60 and answers {items, total}.
judged= is a WHERE on roles.vote. Under a ranking the served score and the
order are the stored score moved by the vote (x0.5 pass, x1.2 like, capped
at 1), so a vote shows at once without a rescore. POST and DELETE
/api/roles/{uid}/vote set and clear it; pressing the pressed stance clears.

★ saves; pressed again it calls DELETE /api/applications/{id}, which drops
the application while it is still saved and answers 409 after. save_role no
longer writes the placeholder next step.

The read page (role.html, role.js) is news's reader: a bar with back,
▲ ● ▼ ★ and ↗, the company with its affinity control, place, badges, salary,
summary, the text (fetched posting, else description) and the link out.
It offers Fetch the posting for a teaser and Summarise without a summary,
against the /text and /summarise routes B4 adds. The vote and star buttons
are judge.js, shared by the feed and the reader.

Applications: titles open the read page, the Next column is gone, a Saved
column instead, and the lede says what the page is for.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-25 21:51:48 +02:00
WolfandClaude Fable 5.1 9035529e0d Summarise and fetch text: a summary stage after score, two role routes
app/jobs/summarise.py is a ModelTask beside extract: about 60 words per role
from title, company, place and the fetched page else the description (capped
at 8000 characters). The pull cascade gains a summarise stage after score that
takes only roles without a summary in the top summarise.per_agent of an
enabled agent's ungated scores, and finds nothing when summarise.enabled is
false or no model is reachable. A reply that leaves a role unanswered is
counted in the state table and the role is given up after three.

POST /api/roles/{uid}/text scrapes original_url once and stores
article_text; POST /api/roles/{uid}/summarise queues a summarise_batch for
that uid alone, deduped per role.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-25 21:39:43 +02:00
WolfandClaude Opus 5.5 8c4bc3112a Schema v4: a role's vote, summary and fetched posting text
One migration for the columns the phone UI's votes, summaries and read page
need, so the packages that build those never both touch the schema. The
columns sit before created_at in SCHEMA: SQLite cannot drop a last column
whose preceding comment would then swallow the closing parenthesis, which
the v1 migration test does.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 21:23:12 +02:00
WolfandClaude Opus 5.5 7a63311714 Rename the package roledesk to app
The boilerplate's rule: the deploy kit's Dockerfile, the APP_CONFIG,
APP_PASSWORD and APP_DATA variables and its commands all assume a package
called app, so a project renames its display title and nothing else. The
console script is `app`, and the launch entry runs `uv run app serve --port
8790`. The domain noun stays `role`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-23 12:30:10 +02:00
WolfandClaude Opus 5.5 bc60324fab Score roles per search agent, and run pull into extract, embed and score
embed stores one vector per open role; score rates every open role for
every enabled agent from require and prefer gates, fit against the
agent's intent, recency and company affinity, keeping gated rows with a
reason. Schema v3 adds vectors and the cached intent vector. The page
gets an agent order, the score on each row, and an Agents tab. Two
starter agents in roles.yaml are imported once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-23 12:14:21 +02:00
WolfandClaude Opus 5.5 4dfb8831aa Extract gate columns from posting text with a Haiku ModelTask
roledesk job extract reads open, unanswered roles 20 to a call and fills
place, country, remote, seniority, salary, currency, function, permit and
languages, only into columns the board left empty. Schema v2 adds
roles.permit, roles.languages and roles.extract_tries. Off by default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-23 12:05:30 +02:00
WolfandClaude Sonnet 5 b44f78ca7e Serve one alpha page: filters, roles, the tracker, and Jobs
/, GET /api/roles|companies|applications, POST /api/companies/{key}/affinity
and /api/applications[/{id}/status]. The Jinja2 template renders an empty
shell; static/app.js fills it and drives Save, affinity and status changes.
<desk-jobs> from pipeline.web mounts at the bottom so Pull can be started
from the page.

Store.roles gains q, function, remote, days and hide_muted, and company/
place move from a key match to a substring on the text a board wrote.
hide_muted filters in SQL before LIMIT: filtering after it shipped first and
broke immediately on real data, since Databricks' freshly pulled 884 roles
were the newest 200-plus rows in the table and muting it left nothing to
show.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-23 11:56:10 +02:00
WolfandClaude Opus 5.5 ac5eca874a Storage: roles, companies, subscriptions, applications, agents
roledesk/storage/schema.py creates the tables at v1 with WAL and the
versioned-migration machinery from newsdesk; store.py adds upsert_role
(unpacks raw into gate columns, first_seen on insert, last_seen every
time), roles(), mark_closed, companies and subscriptions CRUD, and
save_application writing an append-only application_events row on every
status entered. Key helpers company_key, title_key, place_key live in
models.py. docs/decisions.md records the key decisions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-23 11:03:51 +02:00