Rebuild the agent form as the fetch gate, the feed order, the cut and summarise, and name fetch text and the overrides as built

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
WolfandClaude Sonnet 5.5 committed 2026-10-04 15:27:03 +02:00
1 parent fbc0f16c4a
commit 61aadff681
7 files changed
+185 -198

No files matched your search

+37 -38
View File
@@ -2,13 +2,13 @@
{% block title %}Search agents — roledesk{% endblock %}
{# A card per agent: `static/agents.js` fills the list from `/api/agents`,
newest first. A card shows the agent's prompts, its rules in words, its
switch and its weights; Edit turns that card into the form below, in place, and New puts
newest first. A card shows the agent's prompts, its fetch gate in words, its
switch, its weights, its cut and its summarise size; Edit turns that card into the form below, in place, and New puts
a blank one on top. The form is a `<template>` because only one card edits
at a time, so its ids stay unique. #}
{% block content %}
<h1>Search agents</h1>
<p class="lede">A search agent is what the Roles tab ranks by: describe each kind of role you want as a prompt, say where, weigh the terms, and it scores every open role against the prompt each fits best. Several agents rank the same roles differently, each with its own votes and liked companies; Viewing as on Roles picks one, and its votes are that agent's.</p>
<p class="lede">A search agent is what the Roles tab ranks by: describe each kind of role you want as a prompt, set the fetch gate (where, what role), and it measures every open role against the prompt each fits best. Several agents rank the same roles differently, each with its own votes and liked companies; Viewing as on Roles picks one, and its votes are that agent's.</p>
<div class="agents-head">
<p id="agents-count" class="count" role="status"></p>
@@ -27,8 +27,9 @@
<span class="hint">A prompt is one kind of role in your own words: the work, the level, the setting. A role is ranked by the prompt it fits best, so three kinds of role are three prompts, not one blended paragraph. Votes and liked companies count for the whole agent.</span>
</fieldset>
<fieldset class="where">
<legend>Where can the role be?</legend>
<span class="hint">Each line adds places. A role is kept when it fits at least one line, so a line more means more roles, never fewer. With every line empty a role can be anywhere. A role whose location is not known yet ranks until extract reads the posting.</span>
<legend>The fetch gate</legend>
<span class="hint">Hard rules, a yes or no per role, applied at every stage: at the host where it can filter, before anything is scored, again after extract has read the posting, and in the feed. A role that fails is never read by a model and never shown. A rule rejects on evidence only: a role whose location is not known yet passes until extract reads it. A company set to All countries skips the place part and one set to All roles skips the role part, for every agent; both are switched under Sources.</span>
<h3>Region</h3>
<div class="where-line">
<span>Only roles in:</span>
<select id="a-scope" aria-label="Only roles in">
@@ -38,7 +39,9 @@
</select>
<div id="a-scope-countries"></div>
</div>
<span class="hint">Every role must be in this, whatever the lines below add. A company set to All countries is read within this.</span>
<span class="hint">Every role must be in this, and no company switch lifts it. A company set to All countries is fetched and kept from the whole region.</span>
<h3>Place</h3>
<span class="hint">A role passes when it matches at least one line: a country, a town or remote, so a line more means more roles. With every line empty a role can be anywhere in the region.</span>
<div class="where-line">
<span>Anywhere in</span>
<div id="a-countries"></div>
@@ -47,36 +50,29 @@
<span>or in the towns</span>
<div id="a-towns"></div>
</div>
<span class="hint">Towns are for places outside the countries above: with Denmark above, Malmö here adds Malmö to all of Denmark. A town inside a country above changes nothing, since the whole country is in already.</span>
<span class="hint">Towns are for places outside the countries above: with Denmark above, Malmö here adds Malmö to all of Denmark. A town inside a country above changes nothing.</span>
<div class="where-line">
<span>Remote:</span>
<select id="a-remote" aria-label="Remote">
<option value="none">no</option>
<option value="scope">anywhere within the scope</option>
<option value="scope">anywhere within the region</option>
<option value="from">only when open to someone in:</option>
</select>
<div id="a-remote-from"></div>
</div>
<span class="hint">Remote roles are kept on top of the lines above. A remote role whose area is not stated yet ranks until extract reads the posting.</span>
<label class="inline where-rank"><input type="checkbox" id="a-hybrid"> Prefer hybrid<span id="a-hybrid-weight-line">, adding <input type="number" id="a-hybrid-weight" min="0" step="0.05" value="0.05" aria-label="Weight of hybrid"></span></label>
<span class="hint">This one ranks rather than filters: a hybrid role gains a little.</span>
<p id="a-where-sum" class="where-sum" role="status"></p>
</fieldset>
<fieldset class="titles">
<legend>Which titles to leave out?</legend>
<div class="where-line">
<span>Leave out titles with</span>
<div id="a-titles"></div>
</div>
<span class="hint">Separate phrases with a comma or Enter. A phrase matches whole words anywhere in the title, whatever the case: <code>account executive</code> takes "Enterprise Account Executive, UK", and <code>data engineer</code> leaves "Data Engineering Manager" alone. A shorter phrase takes more: <code>sales</code> takes Sales Engineer too. It applies to liked companies as well. A role left out keeps its row, and Show gated on Roles lists it with the phrase that took it.</span>
</fieldset>
<fieldset class="terms">
<legend>What big boards send</legend>
<span class="hint">A remote role passes on top of the lines above. A remote role whose area is not stated yet passes until extract reads the posting.</span>
<h3>Role</h3>
<div class="where-line">
<span>Only roles matching</span>
<div id="a-terms"></div>
</div>
<span class="hint">Separate terms with a comma or Enter: <code>machine learning, data science</code> is two terms, and <code>machine learning</code> is searched as one. A board then sends only roles with one of the terms anywhere in the ad, not only the title. Only applies to big boards read across Europe (All countries). Empty means no narrowing.</span>
<span class="hint">Fetch terms, separated by a comma or Enter: <code>machine learning, data science</code> is two terms, and <code>machine learning</code> is searched as one. They are asked of the host, which then sends only roles with one of the terms anywhere in the ad, not only the title. They apply on boards of 300 or more roles whose host takes a query, and only there; smaller boards and other hosts are read whole. Empty means no narrowing.</span>
<div class="where-line">
<span>Leave out titles with</span>
<div id="a-titles"></div>
</div>
<span class="hint">Phrases, separated by a comma or Enter. A phrase matches whole words anywhere in the title, whatever the case: <code>account executive</code> takes "Enterprise Account Executive, UK", and <code>data engineer</code> leaves "Data Engineering Manager" alone. A shorter phrase takes more: <code>sales</code> takes Sales Engineer too. A host cannot be asked this, so it applies once the roles are in, to liked companies as well. A role left out keeps its row, and Show gated on Roles lists it with the phrase that took it.</span>
<p id="a-where-sum" class="where-sum" role="status"></p>
</fieldset>
<fieldset class="terms cv">
<legend>Your CV</legend>
@@ -97,15 +93,16 @@
<textarea id="a-like-text" rows="4" placeholder="Building a team from scratch, close work with the product side, small companies, a say in the roadmap"></textarea></label>
<label>What I don't like
<textarea id="a-avoid-text" rows="4" placeholder="Constant on-call, sales targets, large consultancies, open-plan offices"></textarea></label>
<span class="hint">The work, the workplace, situations; read by the CV match for the career score. Rules that must hold go under Where or Other rules instead.</span>
<span class="hint">The work, the workplace, situations; read by the CV match for the career score. Rules that must hold go under the fetch gate or Other rules instead.</span>
</fieldset>
<fieldset class="weights">
<legend>How much each counts</legend>
<label>Fit to the text <input type="number" id="a-fit" min="0" step="0.05" value="0.6"></label>
<legend>The feed order</legend>
<label>Fit to the prompts <input type="number" id="a-fit" min="0" step="0.05" value="0.6"></label>
<label>Newness <input type="number" id="a-recency" min="0" step="0.05" value="0.2"></label>
<label>Companies you like <input type="number" id="a-affinity" min="0" step="0.05" value="0.2"></label>
<label>Roles you liked <input type="number" id="a-taste" min="0" step="0.05" value="0.2"></label>
</fieldset>
<span class="hint">The final score, which orders What I'm looking for on Roles: the weighted sum of the four over the sum of the weights. Newness halves every 14 days; Roles you liked is a role's closeness to the roles you liked, away from those you passed. Changing the weights re-sorts and reads nothing.</span>
<fieldset class="weights">
<legend>How much each counts in the CV match</legend>
<label>Skills <input type="number" id="a-cv-skills" min="0" step="5" value="30"></label>
@@ -114,16 +111,18 @@
</fieldset>
<span class="hint">The judge's three numbers are averaged with these shares into the CV match. Changing them re-sorts at once and asks the model for nothing; 0 leaves a number out, all three 0 means no CV match.</span>
<fieldset class="weights limits">
<legend>What the model reads</legend>
<label>Extract the best <input type="number" id="a-extract-top" min="0" step="10" value="500"></label>
<label>down to a score of <input type="number" id="a-extract-min" min="0" max="1" step="0.05" value="0.55"></label>
<label>Summarise the best <input type="number" id="a-summarise-top" min="0" step="5" value="30"></label>
<label>down to a score of <input type="number" id="a-summarise-min" min="0" max="1" step="0.05" value="0.65"></label>
<label>Judge against the CV the best <input type="number" id="a-judge-top" min="0" step="10" value="150"></label>
<label>down to a score of <input type="number" id="a-judge-min" min="0" max="1" step="0.05" value="0.55"></label>
<label>and the closest to the CV <input type="number" id="a-judge-cv-top" min="0" step="10" value="50"></label>
<legend>The cut</legend>
<label>Fit to the prompts: the best <input type="number" id="a-cut-fit-top" min="0" step="10" value="500"></label>
<label>each at least <input type="number" id="a-cut-fit-min" min="0" max="1" step="0.05" value="0.6"></label>
<label>Closeness to the CV: the best <input type="number" id="a-cut-cv-top" min="0" step="10" value="150"></label>
<label>not already in, each at least <input type="number" id="a-cut-cv-min" min="0" max="1" step="0.05" value="0.6"></label>
</fieldset>
<span class="hint">Every pull scores every open role for free; these bound what the model then reads, per agent. The count is the backstop, the score the real stop. Fit is a level, the same in every run: a new role with the worst fit scores about 0.27, a perfect one about 0.87. Roles you saved or liked are summarised too, whatever their score. The judge also reads that many of the roles closest to the CV which the score leaves out, so a role the prompts rank low but the CV fits still gets read; closeness is a free local measure and no part of the score. An agent with no prompt feeds neither extract nor summarise, and one with no CV feeds not the judge.</span>
<span class="hint">Of the roles that pass the fetch gate, the cut holds the best by fit and, of the rest, the best by closeness to the CV. Liked and saved roles are always in, whatever their levels. The cut gets fetch text, extract and judge, so it sets what the models read. Both are levels from 0 to 1, the same in every run and free to compute; a liked company adds about 0.05 to them and a favourite about 0.1. For a broad agent the count stops a list, for a narrow one the minimum does, so roles that do not fit are not read to fill the count. An agent with no prompt has no fit list, and one with no CV no closeness list.</span>
<fieldset class="weights limits">
<legend>After the ranking</legend>
<label>Summarise the top <input type="number" id="a-summarise-top" min="0" step="5" value="50"></label>
</fieldset>
<span class="hint">Summarise writes a short summary and tags for the top of the feed by the final score, and for every role you liked or saved, whatever its score. It is no part of any score.</span>
<details class="advanced">
<summary>Advanced</summary>
<div class="advanced-body">
@@ -131,11 +130,11 @@
<legend>Other rules</legend>
<div id="a-rules" class="rule-rows"></div>
<button type="button" id="a-add-rule" class="secondary">Add rule</button>
<span class="hint">Must: a role must meet it. One of: a role must meet one of these or a Where line. Prefer: a role that meets it gains the weight. Values are separated by commas; salary is a number.</span>
<span class="hint">Must: a role must meet it. One of: a role must meet one of these or a Place line. Not: a role that meets it is left out. Values are separated by commas; salary is a number.</span>
</fieldset>
<label>Rules as sent
<textarea id="a-gates" class="code" rows="6" spellcheck="false" readonly>[]</textarea>
<span class="hint">Read only: what Save sends as the agent's gates, from Where and Other rules.</span></label>
<span class="hint">Read only: what Save sends as the agent's gates, from the fetch gate and Other rules.</span></label>
</div>
</details>
<div class="agent-actions">