Extract as the afterburner for the level: model verdict with stated and title hints, best rank first, agreement per host

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
WolfandClaude Opus 5.5 committed 2026-09-30 09:43:52 +02:00
1 parent 3adafd8950
commit 7ca1f02e26
4 files changed
+194 -23

No files matched your search

+23
View File
@@ -156,6 +156,8 @@ def build_parser() -> argparse.ArgumentParser:
stages.add_argument("name", nargs="?", choices=["extract", "summarise"])
stages.add_argument("state", nargs="?", choices=["on", "off"])
sub.add_parser("seniority", help="per host, how often the stated level equals the model's")
sub.add_parser("dupes", help="recompute which open roles are copies of one posting")
db = sub.add_parser("db", help="database housekeeping")
@@ -182,6 +184,8 @@ def main(argv: list[str] | None = None) -> int:
return run_agents(args)
if args.command == "stages":
return run_stages(args)
if args.command == "seniority":
return run_seniority(args)
if args.command == "dupes":
return run_dupes(args)
return init_db(args)
@@ -631,6 +635,25 @@ def run_stages(args: argparse.Namespace) -> int:
return 0
def run_seniority(args: argparse.Namespace) -> int:
"""`app seniority`: per host, the roles that have both a stated and a
model level and how many of them agree, `Store.seniority_agreement`, as
a table. For deciding which host's stated level to trust."""
from app.storage import Store
config = config_mod.load(args.config)
found = Store(config.database).seniority_agreement()
if not found:
print("no role has a stated level yet")
return 0
print(f"{'host':20} {'compared':>8} {'agreed':>7} {'rate':>6} {'unread':>7}")
for h in found:
rate = "-" if h["rate"] is None else f"{h['rate']:.0%}"
print(f"{h['host'] or '(none)':20} {h['compared']:8} {h['agreed']:7} {rate:>6} "
f"{h['stated_only']:7}")
return 0
def run_dupes(args: argparse.Namespace) -> int:
"""`app dupes`: what the end of every pull runs, `Store.rebuild_dupes`,
now. Prints the groups (kept roles with a copy), the copies the feed