Ask where a role can be as a list of lines it matches any of

The Where block asked for a required country set and then a one-of set,
in ISO codes. It is now one question, "Where can the role be?", with
countries by name, towns, and Remote within Europe or anywhere, each
line read on its own, and a sentence under it that is the card's.
Other rules move under Advanced, open when the agent has one. The
gates the API stores do not change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
WolfandClaude Opus 5.5 committed 2026-09-29 16:45:59 +02:00
1 parent 6124b00062
commit 3c19ded014
3 files changed
+212 -113

No files matched your search

+179 -93
View File
@@ -5,9 +5,10 @@
* switch, its prompts, its gates in words, its weights, and a link to the * switch, its prompts, its gates in words, its weights, and a link to the
* Roles tab in its order. The prompts are the body, since fit is measured * Roles tab in its order. The prompts are the body, since fit is measured
* against the one a role fits best; the weights only share out the terms. * against the one a role fits best; the weights only share out the terms.
* The form edits the prompts as rows, and the gates as a Where block for the * The form edits the prompts as rows, and the gates as a Where block, a
* usual location rules over a row per remaining rule; a gate Where cannot * short list of lines a role passes by matching any one of, over a row per
* say lands in a row, so a load and a save lose nothing. Edit turns a card * remaining rule under Advanced; a gate Where cannot say lands in a row, so
* a load and a save lose nothing. Edit turns a card
* into the form from the page's `<template>`, in place, and New agent puts a * into the form from the page's `<template>`, in place, and New agent puts a
* blank card on top in the same state. One card edits at a time, so the * blank card on top in the same state. One card edits at a time, so the
* form's ids stay unique. Votes, liked companies and scores are the agent's, * form's ids stay unique. Votes, liked companies and scores are the agent's,
@@ -101,6 +102,29 @@
} }
} }
// The countries Where offers, by name: Europe's, without EU, which is not
// a country but "open anywhere in Europe" and is said by Remote.
const COUNTRIES = EUROPE.filter((c) => c !== "EU")
.map((c) => [c, countryName(c)])
.sort((a, b) => a[1].localeCompare(b[1]));
// "a, b or c": the values of one line.
function orList(items) {
return items.length < 2 ? items.join("") : `${items.slice(0, -1).join(", ")} or ${items[items.length - 1]}`;
}
// A town without its accents, lower case: "Malmo" is "Malmö" spelt for a
// board that writes ASCII, one town with two spellings.
function fold(text) {
return String(text).normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase();
}
// The towns, one spelling each: the first of those that fold alike.
function towns(values) {
const seen = new Set();
return values.map(String).filter((v) => !seen.has(fold(v)) && seen.add(fold(v)));
}
// Until the backend returns `prompts`: an intent is one prompt named after its agent. // Until the backend returns `prompts`: an intent is one prompt named after its agent.
function promptsOf(row) { function promptsOf(row) {
if (row.prompts) return row.prompts; if (row.prompts) return row.prompts;
@@ -157,38 +181,48 @@
return `fit ${w.fit} · newness ${w.recency} · companies ${w.affinity} · liked ${w.taste}`; return `fit ${w.fit} · newness ${w.recency} · companies ${w.affinity} · liked ${w.taste}`;
} }
// One gate as a phrase: "in Denmark", "remote", "seniority senior, staff". // One gate as a phrase: "in Denmark or Sweden", "remote", "with seniority
// Europe, whole, is one word rather than 33 countries. // senior, staff". Europe, whole, is one word rather than 33 countries.
function phrase(gate) { function phrase(gate) {
const values = gate.values.map(String); const values = gate.values.map(String);
if (gate.field === "country") { if (gate.field === "country") {
const europe = EUROPE.every((c) => values.includes(c)); const europe = EUROPE.every((c) => values.includes(c));
const rest = values.filter((v) => !(europe && EUROPE.includes(v))).map(countryName); const rest = values.filter((v) => !(europe && EUROPE.includes(v))).map(countryName);
return `in ${(europe ? ["Europe", ...rest] : rest).join(", ")}`; return `in ${orList(europe ? ["Europe", ...rest] : rest)}`;
} }
if (gate.field === "place") return `in ${values.join(", ")}`; if (gate.field === "place") return `in ${orList(towns(values))}`;
if (gate.field === "remote") return values.join(" or "); if (gate.field === "remote") return orList(values);
if (gate.field === "company") return `at ${values.join(", ")}`; if (gate.field === "company") return `at ${orList(values)}`;
if (gate.field === "salary_min") return `paying at least ${values[0]}`; if (gate.field === "salary_min") return `paying at least ${values[0]}`;
return `${gate.field} ${values.join(", ")}`; return `with ${gate.field.replace("_", " ")} ${values.join(", ")}`;
} }
// The gates in words: what a role must meet, then the one group it must // The Where block in words, one sentence of the lines a role may match,
// meet one of, then what lifts it. "In Europe, and in Denmark or remote or // with the one-of rows among them since they are the same group: "Roles in
// in Malmö, Lund. Prefers hybrid." // Denmark, in Malmö, Lund or Helsingborg, or remote within Europe."
function rulesLine(gates) { function whereSentence(where, others) {
const of = (mode) => gates.filter((g) => g.mode === mode).map(phrase); const parts = [];
const must = of("require"); if (where.countries) parts.push(phrase(where.countries));
const any = of("any"); if (where.places) parts.push(phrase(where.places));
const prefer = of("prefer"); if (where.remote) parts.push(where.europe ? "remote within Europe" : "remote");
const sentences = []; parts.push(...others.map(phrase));
const first = []; if (!parts.length) return "";
if (must.length) first.push(must.join(", ")); return `Roles ${parts.length < 2 ? parts[0] : `${parts.slice(0, -1).join(", ")}, or ${parts[parts.length - 1]}`}.`;
if (any.length) first.push(`${must.length ? "and " : ""}${any.join(" or ")}`);
if (first.length) {
const text = first.join(", ");
sentences.push(`${text[0].toUpperCase()}${text.slice(1)}.`);
} }
// The gates in words: where a role may be, then what it must meet, then
// what lifts it. "Roles in Denmark, or remote within Europe. Only roles
// with seniority senior. Prefers hybrid."
function rulesLine(gates) {
const { where, rest } = distribute(gates);
const of = (mode) => rest.filter((g) => g.mode === mode);
const must = of("require").map(phrase);
const prefer = of("prefer").map((g) => phrase(g).replace(/^with /, ""));
if (where.hybrid) prefer.unshift("hybrid");
const sentences = [];
const any = whereSentence(where, of("any"));
if (any) sentences.push(any);
if (must.length) sentences.push(`Only roles ${must.join(" and ")}.`);
if (prefer.length) sentences.push(`Prefers ${prefer.join("; ")}.`); if (prefer.length) sentences.push(`Prefers ${prefer.join("; ")}.`);
return sentences.join(" "); return sentences.join(" ");
} }
@@ -272,48 +306,36 @@
} }
// A list of values as chips, the rail's tags with news's filter pills' ×, // A list of values as chips, the rail's tags with news's filter pills' ×,
// and a box after them that adds on Enter or a comma. Country codes are // then `entry`, the control that adds to it. `label` is a value in words.
// `upper`, and all of Europe is one chip. What is typed but not added yet // `group` puts values that are one thing on one chip, whose × drops them
// counts, so Save does not drop it. // all. `drawn` runs after each redraw, for an entry that lists what is left.
function chipInput(values, label, placeholder, upper) { function chipList(values, entry, { label = String, group = (v) => v, drawn = () => {} } = {}) {
const list = values.map(String); const list = values.map(String);
const box = el("div", "chips"); const box = el("div", "chips");
const input = el("input");
input.type = "text";
input.spellcheck = false;
input.placeholder = placeholder;
input.setAttribute("aria-label", label);
const split = (text) => text.split(",").map((v) => (upper ? v.trim().toUpperCase() : v.trim())).filter(Boolean); function chip(value) {
const europe = () => upper && EUROPE.every((c) => list.includes(c)); const same = list.filter((v) => group(v) === group(value));
const text = label(value);
function chip(text, title, drop) {
const button = el("button", "tag", `${text} `); const button = el("button", "tag", `${text} `);
button.type = "button"; button.type = "button";
button.title = title; button.title = same.length > 1 ? `Also matches ${same.slice(1).join(", ")}` : value;
button.setAttribute("aria-label", `Remove ${text}`); button.setAttribute("aria-label", `Remove ${text}`);
const x = el("span", "", "×"); const x = el("span", "", "×");
x.setAttribute("aria-hidden", "true"); x.setAttribute("aria-hidden", "true");
button.appendChild(x); button.appendChild(x);
button.addEventListener("click", () => { button.addEventListener("click", () => {
drop(); list.splice(0, list.length, ...list.filter((v) => group(v) !== group(value)));
draw(); draw();
changed(box); changed(box);
input.focus(); entry.focus();
}); });
return button; return button;
} }
function draw() { function draw() {
const whole = europe(); const firsts = list.filter((v, i) => list.findIndex((w) => group(w) === group(v)) === i);
const chips = whole box.replaceChildren(...firsts.map(chip), entry);
? [chip("Europe", EUROPE.join(" "), () => list.splice(0, list.length, ...list.filter((v) => !EUROPE.includes(v))))] drawn(list);
: [];
for (const value of list) {
if (whole && EUROPE.includes(value)) continue;
chips.push(chip(value, upper ? countryName(value) : "", () => list.splice(list.indexOf(value), 1)));
}
box.replaceChildren(...chips, input);
} }
function add(more) { function add(more) {
@@ -323,24 +345,56 @@
if (list.length !== before) changed(box); if (list.length !== before) changed(box);
} }
draw();
return { node: box, list, add };
}
// Countries as chips by name, added from a select of Europe's by name;
// the select leaves out the ones already chips.
function countryInput(values) {
const pick = el("select");
pick.setAttribute("aria-label", "Add a country");
const offer = (list) => {
const blank = el("option", "", "Add a country");
blank.value = "";
const left = COUNTRIES.filter(([code]) => !list.includes(code)).map(([code, name]) => {
const option = el("option", "", name);
option.value = code;
return option;
});
pick.replaceChildren(blank, ...left);
pick.value = "";
};
const chips = chipList(values, pick, { label: countryName, drawn: offer });
pick.addEventListener("change", () => { if (pick.value) chips.add([pick.value]); });
return { node: chips.node, values: () => [...chips.list] };
}
// Towns as chips of free text, added on Enter or a comma, and one chip for
// the spellings of a town. What is typed but not added yet counts, so Save
// does not drop it.
function townInput(values) {
const input = el("input");
input.type = "text";
input.spellcheck = false;
input.placeholder = "Add a town";
input.setAttribute("aria-label", "Add a town");
const split = (text) => text.split(",").map((v) => v.trim()).filter(Boolean);
const chips = chipList(values, input, { group: fold });
const take = () => {
const typed = split(input.value);
input.value = "";
chips.add(typed);
};
input.addEventListener("keydown", (event) => { input.addEventListener("keydown", (event) => {
if (event.key !== "Enter" && event.key !== ",") return; if (event.key !== "Enter" && event.key !== ",") return;
event.preventDefault(); event.preventDefault();
const typed = split(input.value); take();
input.value = "";
add(typed);
}); });
input.addEventListener("blur", () => { input.addEventListener("blur", take);
const typed = split(input.value);
input.value = "";
add(typed);
});
draw();
return { return {
node: box, node: chips.node,
add, values: () => [...chips.list, ...split(input.value).filter((v) => !chips.list.includes(v))],
whole: europe,
values: () => [...list, ...split(input.value).filter((v) => !list.includes(v))],
}; };
} }
@@ -422,25 +476,43 @@
// Share out an agent's gates between the Where block and Other rules. Each // Share out an agent's gates between the Where block and Other rules. Each
// Where line takes the first gate it can say whole; the rest are rows. A // Where line takes the first gate it can say whole; the rest are rows. A
// must or one-of gate with a weight other than the default stays a row, // must or one-of gate with a weight other than the default stays a row,
// since Where would drop it. // since Where would drop it. Remote within Europe is a must on country
// that is Europe and the countries line exactly, and only with Remote
// ticked; any other must on country is a row, and Remote reads anywhere.
function distribute(gates) { function distribute(gates) {
const where = { in: null, anyCountry: null, remote: null, places: null, hybrid: null }; const where = { countries: null, places: null, remote: null, europe: null, hybrid: null };
const rest = []; const rest = [];
const musts = [];
const plain = (g) => g.weight === undefined || g.weight === 1; const plain = (g) => g.weight === undefined || g.weight === 1;
const only = (g, value) => g.values.length === 1 && g.values[0] === value; const only = (g, value) => g.values.length === 1 && g.values[0] === value;
for (const g of gates) { for (const g of gates) {
let slot = null; let slot = null;
if (g.field === "country" && g.mode === "require" && plain(g)) slot = "in"; if (g.field === "country" && g.mode === "require" && plain(g)) {
else if (g.field === "country" && g.mode === "any" && plain(g)) slot = "anyCountry"; musts.push(g);
continue;
}
if (g.field === "country" && g.mode === "any" && plain(g)) slot = "countries";
else if (g.field === "remote" && g.mode === "any" && plain(g) && only(g, "remote")) slot = "remote"; else if (g.field === "remote" && g.mode === "any" && plain(g) && only(g, "remote")) slot = "remote";
else if (g.field === "place" && g.mode === "any" && plain(g)) slot = "places"; else if (g.field === "place" && g.mode === "any" && plain(g)) slot = "places";
else if (g.field === "remote" && g.mode === "prefer" && only(g, "hybrid")) slot = "hybrid"; else if (g.field === "remote" && g.mode === "prefer" && only(g, "hybrid")) slot = "hybrid";
if (slot && !where[slot]) where[slot] = g; if (slot && !where[slot]) where[slot] = g;
else rest.push(g); else rest.push(g);
} }
const within = new Set(europeWith(where.countries ? where.countries.values : []));
for (const g of musts) {
const same = g.values.length === within.size && g.values.every((v) => within.has(v));
if (where.remote && !where.europe && same) where.europe = g;
else rest.push(g);
}
return { where, rest }; return { where, rest };
} }
// What Remote within Europe sends: Europe, and the countries line too,
// since the must holds for every role, not only the remote ones.
function europeWith(countries) {
return [...EUROPE, ...countries.filter((c) => !EUROPE.includes(c))];
}
function form(row) { function form(row) {
const div = el("article", "agent-card editing"); const div = el("article", "agent-card editing");
const f = $("#agent-form-template").content.querySelector("form").cloneNode(true); const f = $("#agent-form-template").content.querySelector("form").cloneNode(true);
@@ -470,20 +542,26 @@
}); });
const { where, rest } = distribute(row ? row.gates : []); const { where, rest } = distribute(row ? row.gates : []);
const within = chipInput(where.in ? where.in.values : [], "Only roles in these countries", "DK, SE", true); const countries = countryInput(where.countries ? where.countries.values : []);
const anyCountry = chipInput(where.anyCountry ? where.anyCountry.values : [], "Or in one of these countries", "DK", true); const places = townInput(where.places ? where.places.values : []);
const places = chipInput(where.places ? where.places.values : [], "Or in one of these places", "Malmö, Lund", false); $("#a-countries", f).replaceWith(countries.node);
$("#a-in", f).replaceWith(within.node); $("#a-towns", f).replaceWith(places.node);
$("#a-any-country", f).replaceWith(anyCountry.node); const remote = $("#a-remote", f);
$("#a-places", f).replaceWith(places.node); const scope = $("#a-remote-scope", f);
// Europe is offered while it is not whole in the list already. remote.checked = Boolean(where.remote);
const europe = $("#a-europe", f); // Anywhere when a must on country is a row, so ticking Remote does not
const offerEurope = () => { europe.hidden = within.whole(); }; // stack a second one on it; else Europe, the usual answer.
europe.addEventListener("click", () => within.add(EUROPE)); const mustRow = rest.some((g) => g.field === "country" && g.mode === "require");
offerEurope(); scope.value = where.europe || !(where.remote || mustRow) ? "europe" : "anywhere";
$("#a-remote", f).checked = Boolean(where.remote); const offerScope = () => { scope.disabled = !remote.checked; };
offerScope();
// The hybrid weight shows only when it is not the default; either way it
// is sent back as it came.
const hybridWeight = where.hybrid && where.hybrid.weight !== undefined ? where.hybrid.weight : HYBRID_WEIGHT;
$("#a-hybrid", f).checked = Boolean(where.hybrid); $("#a-hybrid", f).checked = Boolean(where.hybrid);
$("#a-hybrid-weight", f).value = where.hybrid && where.hybrid.weight !== undefined ? where.hybrid.weight : HYBRID_WEIGHT; $("#a-hybrid-weight", f).value = hybridWeight;
$("#a-hybrid-weight-line", f).hidden = hybridWeight === HYBRID_WEIGHT;
$("details.advanced", f).open = rest.length > 0;
const rules = []; const rules = [];
const dropRule = (node) => { const dropRule = (node) => {
@@ -503,23 +581,31 @@
changed(f); changed(f);
}); });
// The gates Save sends: the Where lines that say something, then the rows. // The gates the Where block says, in the order the starter agents have
function gates() { // them: the must on country, the lines, then hybrid.
function whereGates() {
const out = []; const out = [];
const line = (chips, field, mode) => { const within = countries.values();
const values = chips.values(); const towns = places.values();
if (values.length) out.push({ field, values, mode }); if (remote.checked && scope.value === "europe") {
}; out.push({ field: "country", values: europeWith(within), mode: "require" });
line(within, "country", "require"); }
line(anyCountry, "country", "any"); if (within.length) out.push({ field: "country", values: within, mode: "any" });
if ($("#a-remote", f).checked) out.push({ field: "remote", values: ["remote"], mode: "any" }); if (remote.checked) out.push({ field: "remote", values: ["remote"], mode: "any" });
line(places, "place", "any"); if (towns.length) out.push({ field: "place", values: towns, mode: "any" });
if ($("#a-hybrid", f).checked) { if ($("#a-hybrid", f).checked) {
out.push({ field: "remote", values: ["hybrid"], mode: "prefer", weight: Number($("#a-hybrid-weight", f).value) }); out.push({ field: "remote", values: ["hybrid"], mode: "prefer", weight: Number($("#a-hybrid-weight", f).value) });
} }
return out.concat(rules.map((r) => r.read())); return out;
} }
const view = () => { $("#a-gates", f).value = JSON.stringify(gates(), null, 2); }; // The gates Save sends: the Where block's, then the rows. The sentence
// under Where says them all, as the card will, rows included.
const gates = () => whereGates().concat(rules.map((r) => r.read()));
const view = () => {
offerScope();
$("#a-gates", f).value = JSON.stringify(gates(), null, 2);
$("#a-where-sum", f).textContent = rulesLine(gates()) || "Roles anywhere.";
};
view(); view();
$("#a-fit", f).value = weights.fit; $("#a-fit", f).value = weights.fit;
@@ -531,7 +617,7 @@
$("#a-summarise-top", f).value = limits.summarise_top; $("#a-summarise-top", f).value = limits.summarise_top;
$("#a-summarise-min", f).value = limits.summarise_min; $("#a-summarise-min", f).value = limits.summarise_min;
$("#a-delete", f).hidden = !row; $("#a-delete", f).hidden = !row;
f.addEventListener("input", () => { f.dataset.dirty = "true"; view(); offerEurope(); }); f.addEventListener("input", () => { f.dataset.dirty = "true"; view(); });
f.addEventListener("change", view); f.addEventListener("change", view);
f.addEventListener("submit", (event) => save(event, row, () => prompts.map((p) => p.read()), gates)); f.addEventListener("submit", (event) => save(event, row, () => prompts.map((p) => p.read()), gates));
$("#a-cancel", f).addEventListener("click", () => { close(); render(); }); $("#a-cancel", f).addEventListener("click", () => { close(); render(); });
+9 -2
View File
@@ -1174,17 +1174,24 @@ table.applications td[data-label="Saved"] { white-space: nowrap; color: var(--di
.rule-rows:empty, .prompt-rows:empty { display: none; } .rule-rows:empty, .prompt-rows:empty { display: none; }
.agent-form .rule-row input[type="text"] { flex: 1 1 8rem; width: auto; min-width: 0; } .agent-form .rule-row input[type="text"] { flex: 1 1 8rem; width: auto; min-width: 0; }
.agent-form .rule-row input[type="number"], .agent-form .where input[type="number"] { width: 5rem; flex: none; } .agent-form .rule-row input[type="number"], .agent-form .where input[type="number"] { width: 5rem; flex: none; }
/* A Where line: its words, then its chips, which wrap under them on a phone. */ /* A Where line: its words, then its chips, which wrap under them on a phone.
The words share one width, so the chips of every line start level. */
.where-line { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; font-size: .9rem; } .where-line { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; font-size: .9rem; }
.where-line > span { flex: none; } .where-line > span, .where-line > label { flex: none; min-width: 9rem; }
.where-line .chips { flex: 1 1 12rem; } .where-line .chips { flex: 1 1 12rem; }
/* Hybrid ranks rather than filters, so it stands apart from the lines, and
the sentence under it says the whole block. */
.agent-form .where-rank { margin-top: .4rem; }
.agent-form .where-sum { margin: 0; padding-top: .5rem; border-top: 1px solid var(--line); font-size: .9rem; }
/* Values as the rail's tags, each removed by its ×; the box to add one takes /* Values as the rail's tags, each removed by its ×; the box to add one takes
the rest of the line. */ the rest of the line. */
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; min-width: 0; } .chips { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; min-width: 0; }
.agent-form .chips input[type="text"] { flex: 1 1 6rem; width: auto; min-width: 0; } .agent-form .chips input[type="text"] { flex: 1 1 6rem; width: auto; min-width: 0; }
.agent-form .chips select { flex: 0 1 12rem; min-width: 0; max-width: 100%; }
.chips .tag span { color: var(--faint); } .chips .tag span { color: var(--faint); }
.agent-form details summary { cursor: pointer; color: var(--dim); font-size: .9rem; } .agent-form details summary { cursor: pointer; color: var(--dim); font-size: .9rem; }
.agent-form details[open] summary { margin-bottom: .5rem; } .agent-form details[open] summary { margin-bottom: .5rem; }
.agent-form .advanced-body { display: flex; flex-direction: column; gap: .6rem; }
/* ================================================================ */ /* ================================================================ */
/* companies and sources — the Sources page's sections, */ /* companies and sources — the Sources page's sections, */
+24 -18
View File
@@ -27,29 +27,27 @@
<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> <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>
<fieldset class="where"> <fieldset class="where">
<legend>Where</legend> <legend>Where can the role be?</legend>
<span class="hint">A role passes when it matches any line; with none filled in, it can be anywhere. A role whose location is not known yet ranks until extract reads the posting.</span>
<div class="where-line"> <div class="where-line">
<span>Only roles in</span> <span>In these countries</span>
<div id="a-in"></div> <div id="a-countries"></div>
<button type="button" id="a-europe" class="secondary">Europe</button>
</div> </div>
<div class="where-line"> <div class="where-line">
<span>and one of: in</span> <span>In these towns</span>
<div id="a-any-country"></div> <div id="a-towns"></div>
</div> </div>
<label class="inline"><input type="checkbox" id="a-remote"> or remote</label> <span class="hint">A town matches as part of the location, so Lund matches "Lund, Sweden": it is for towns outside the countries above.</span>
<div class="where-line"> <div class="where-line">
<span>or in</span> <label class="inline"><input type="checkbox" id="a-remote"> Remote</label>
<div id="a-places"></div> <select id="a-remote-scope" aria-label="Remote from where">
<option value="europe">within Europe</option>
<option value="anywhere">anywhere</option>
</select>
</div> </div>
<label class="inline"><input type="checkbox" id="a-hybrid"> Prefer hybrid, adding <input type="number" id="a-hybrid-weight" min="0" step="0.05" value="0.05" aria-label="Weight of hybrid"></label> <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">Countries are ISO codes such as DK or SE, added with Enter or a comma; EU is a role open anywhere in Europe. Places are towns, matched as part of the location, so Lund matches "Lund, Sweden". An empty line is no rule. A rule only rejects a role whose column is filled; an empty one ranks until extract reads the posting.</span> <span class="hint">This one ranks rather than filters: a hybrid role gains a little.</span>
</fieldset> <p id="a-where-sum" class="where-sum" role="status"></p>
<fieldset class="rules">
<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 and of the "one of" line above. Prefer: a role that meets it gains the weight. Values are separated by commas; salary is a number.</span>
</fieldset> </fieldset>
<fieldset class="weights"> <fieldset class="weights">
<legend>How much each counts</legend> <legend>How much each counts</legend>
@@ -68,9 +66,17 @@
<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. An agent with no prompt feeds neither stage.</span> <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. An agent with no prompt feeds neither stage.</span>
<details class="advanced"> <details class="advanced">
<summary>Advanced</summary> <summary>Advanced</summary>
<div class="advanced-body">
<fieldset class="rules">
<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>
</fieldset>
<label>Rules as sent <label>Rules as sent
<textarea id="a-gates" class="code" rows="6" spellcheck="false" readonly>[]</textarea> <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 above.</span></label> <span class="hint">Read only: what Save sends as the agent's gates, from Where and Other rules.</span></label>
</div>
</details> </details>
<div class="agent-actions"> <div class="agent-actions">
<button type="submit">Save and score</button> <button type="submit">Save and score</button>