Judge an enabled agent with a CV whether or not it has a prompt, as ADR 2.2 has it: its cut is the CV list and the kept, and its profile goes without wants.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
WolfandClaude Fable 5.1 committed 2026-10-05 09:26:48 +02:00
1 parent 3388b97cf4
commit 7ac63dea7c
2 files changed
+25 -9

No files matched your search

+6 -6
View File
@@ -14,8 +14,8 @@ career count as at most `app.models.BROKEN_CAP` (4), when the role is
served. Culture and location are left out: the first is guessed from ad text, served. Culture and location are left out: the first is guessed from ad text,
the second is what the fetch gate does. the second is what the fetch gate does.
The work is pairs, `(agent, role)`: an enabled agent with a CV and a prompt, The work is pairs, `(agent, role)`: an enabled agent with a CV, with or
and an open role in its cut (`scores.cut`, see `app.jobs.score`: the best by without a prompt, and an open role in its cut (`scores.cut`, see `app.jobs.score`: the best by
fit, the best by CV closeness that those leave out, and the liked and saved) fit, the best by CV closeness that those leave out, and the liked and saved)
with some text, that has no judgement yet, or one read from another CV, with some text, that has no judgement yet, or one read from another CV,
prompts, like, avoid or must text or role text than today's (`input_key`). prompts, like, avoid or must text or role text than today's (`input_key`).
@@ -189,10 +189,10 @@ def input_key(agent: Agent, text: str) -> str:
def _judged(agent: Agent) -> bool: def _judged(agent: Agent) -> bool:
"""Whether `judge` reads for this agent at all: enabled, with a CV and a """Whether `judge` reads for this agent at all: enabled, with a CV. An
prompt with text (without one nothing of its cut is in by fit).""" agent without a prompt is judged too: its cut is the CV list and the
return agent.enabled and bool(agent.cv_text.strip()) \ kept, and the profile goes without `<wants>` (`system`)."""
and any(p.text.strip() for p in agent.prompts) return agent.enabled and bool(agent.cv_text.strip())
def waiting(store: Store, keys: Sequence[str] | None = None, def waiting(store: Store, keys: Sequence[str] | None = None,
+19 -3
View File
@@ -194,12 +194,28 @@ def hashlib_old_key(agent: Any, text: str) -> str:
return hashlib.sha1(blob.encode()).hexdigest()[:16] return hashlib.sha1(blob.encode()).hexdigest()[:16]
def test_only_enabled_agents_with_a_cv_and_a_prompt_are_judged(store: Store) -> None: def test_only_enabled_agents_with_a_cv_are_judged(store: Store) -> None:
for name, kwargs in (("No CV", {"cv": " "}), ("Off", {"enabled": False})): for name, kwargs in (("No CV", {"cv": " "}), ("Off", {"enabled": False})):
ranked(store, hunter(store, name, **kwargs), name) ranked(store, hunter(store, name, **kwargs), name)
bare = store.save_agent("No prompt", cv_text=CV) bare = store.save_agent("No prompt", cv_text=CV)
ranked(store, bare, "bare") [uid] = ranked(store, bare, "bare")
assert judge.waiting(store) == [] assert [(a.id, row["uid"]) for a, row, _, _ in judge.waiting(store)] == [(bare.id, uid)]
def test_an_agent_without_a_prompt_is_judged_without_wants(
store: Store, config: Config, monkeypatch: pytest.MonkeyPatch) -> None:
"""A CV alone is enough: the cut is the CV list, and the profile has no
`<wants>` block."""
bare = store.save_agent("No prompt", cv_text=CV)
[uid] = ranked(store, bare, "1")
model = stub(monkeypatch)
modeltask.run(judge.TASK, config, store)
found = store.judgement(bare.id, uid)
assert found is not None and (found.skills, found.experience, found.career) == (8, 7, 9)
[system] = model.systems
assert CV in system and "<wants" not in system
def test_the_agents_cut_is_what_is_read_by_fit_then_cv_then_kept(store: Store) -> None: def test_the_agents_cut_is_what_is_read_by_fit_then_cv_then_kept(store: Store) -> None: