Skip to content

refactor!: rename legal-judge to rubric-judge, with a general default judge - #35

Merged
osolmaz merged 1 commit into
mainfrom
feat/rubric-judge
Oct 28, 2026
Merged

osolmaz merged 1 commit into
mainfrom
feat/rubric-judge

Conversation

@osolmaz

@osolmaz osolmaz commented Oct 28, 2026

Copy link
Copy Markdown
Owner

Summary

The legal-judge example grades a saved answer against a task's rubric, and almost nothing in it is about legal work.
Only the judge file's texts said "a legal task", and two search patterns looked for clause references and a list of currencies.
This change renames the example to rubric-judge and gives it a general default judge, while the old legal judge stays as a judge file of its own.
Requests made with judges/legal.json are the same as the old default's, so legal scores stay comparable with the earlier runs.

What Changed

The package moves to examples/rubric-judge, and its domain, package and code names follow.
The judge texts are the only part that the model reads differently, and only with the new default judge.

  • Judges. judges/general.json is the new default: the old texts without "legal", and with a general example in the rules. judges/legal.json and judges/legal-qualifiers.json are the old two files, with the new domain name.
  • Names. The domain is rubric-judge, and the package @switch-examples/rubric-judge. LegalState, LegalCase, legalMachine and legalJudge become JudgeState, JudgeCase, judgeMachine and rubricJudge.
  • Search patterns. They stay. Section, clause and article references, figures and dates occur in many kinds of documents; only the comments change.
  • Repository. The README, AGENTS.md, the CI job, the Slophammer boundaries and the lockfile follow the new path.

Testing

I ran every check of switch, the viewer and both examples.

  • pnpm check: format, lint, typecheck, coverage, DRY and Slophammer with no findings. 68 tests in switch, 35 in the viewer, 74 in chess and 46 in rubric-judge.
  • A new test checks that the default judge is general and names no legal word, and that both legal judges parse, with the same questions. The judge schema test also refuses a choices limit of 1.

I made no model calls, so the general judge has no score yet.

Risks

The general judge has not been measured yet, and all labelled cases so far are legal tasks.

  • A run with the default judge now uses other texts than before. To compare with earlier legal runs, pass --judge examples/rubric-judge/judges/legal.json.
  • Case folders, sets and run folders outside the repository that name legal-judge or its judge files need the new names.

… judge

The example grades an answer against a rubric for any kind of task: only its judge texts and two search patterns were
about legal tasks. The domain and package are now `rubric-judge`, and its names follow (`JudgeState`, `JudgeCase`,
`judgeMachine`, `rubricJudge`, `rubricJudgeSetup`).

- `judges/general.json`, the default, names no field of work.
- `judges/legal.json` keeps the old default's texts, so its scores compare with the earlier runs', and
  `judges/legal-qualifiers.json` keeps the qualifiers variant.
- The search patterns stay: section, clause and article references occur in many kinds of documents.
- The README, AGENTS.md, CI and the Slophammer boundaries follow.
@osolmaz
osolmaz merged commit 958d11c into main Oct 28, 2026
1 check passed
@osolmaz
osolmaz deleted the feat/rubric-judge branch October 28, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant