judge

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 2, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package judge asks an agent one yes-or-no question on what a role produced, at the best independence available from the agent that produced it (ADR-0005): another provider, another model of it, or the same model in a context of its own. The engine asks it when a role's judge step has a question no check can answer; the evaluation, to grade.

Index

Constants

This section is empty.

Variables

View Source
var Levels = map[string]int{"provider": 3, "model": 2, "context": 1}

Levels of independence, strongest first (ADR-0005).

Functions

func Independence

func Independence(judgeSpec, judgeModel, authorSpec string, authorModels []string) string

Independence is how far a judge stands from the models that produced the work: another provider, another model of it, or the same model.

func Pick

func Pick(authorSpec, authorModel string) string

Pick is the judge for work an agent produced, when no judge is named: of Claude, the other of its two strongest models; otherwise the same agent, in a context of its own.

func Provider

func Provider(spec string) string

Provider is the provider part of an agent spec ("claude" in "claude:opus").

func Verdict

func Verdict(note string) (yes bool, why string, err error)

Verdict reads the judge's note: "yes: why" or "no: why". The note may come raw, with its YAML around it.

Types

type Answer

type Answer struct {
	Yes   bool
	Why   string     // the reason, one line
	Model string     // the model that answered
	Call  agent.Call // the call, with its tokens
}

Answer is what the judge said.

func Ask

func Ask(spec string, judgeRole *role.Role, question, material string) (Answer, error)

Ask puts question and material to the agent spec names, in a run folder of its own, as the judge role.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL