The evaluation system in skill-up is a multi-stage pipeline designed to verify agent performance against specific criteria. It orchestrates the lifecycle from workspace preparation and agent execution to automated grading and result aggregation.
The evaluation pipeline follows a structured sequence to transform a case definition into a graded result:
Runtime is prepared (e.g., starting a Docker container or initializing a local workspace).claude_code, codex) runs the task described in the case via agent.Agent.Run internal/agent/agent.go143judge.Judge.Evaluate internal/judge/factory.go22-49collect_artifacts patterns are downloaded from the workspace.The judge.Input struct internal/judge/judge.go55-98 serves as the unified data boundary between the execution layer and the evaluation layer, carrying the transcript, workspace diffs, final messages, and exit codes to the judge.
Evaluator Pipeline Flow
Sources: internal/evaluator/evaluator.go179-237 | internal/judge/judge.go55-98 | internal/judge/judge.go112-142 | internal/judge/factory.go22-49
skill-up supports three distinct judging strategies, selectable via the judge.type field in configuration. The judge.NewJudge factory instantiates the correct implementation based on the config.JudgeConfig internal/judge/factory.go22-50
| Judge Type | Description | Best For |
|---|---|---|
| Rule-based | Applies declarative assertions like OutputContains, ExitCode, or ToolCalled internal/judge/rule_based.go17-22 | Deterministic output and side-effect validation. |
| Script | Executes a host-side or runtime script where exit code 0 indicates success internal/judge/factory.go31-35 | Complex logic or environment-specific checks. |
| Agent Judge | Uses an LLM to grade performance against a list of criteria internal/judge/agent_judge.go55-81 | Subjective or nuanced quality assessment. |
For details, see Judge Types.
Judge Implementation Mapping
Sources: internal/judge/factory.go22-50 | internal/judge/rule_based.go17-30 | internal/judge/agent_judge.go55-81
Evaluations are defined using eval.yaml (global settings) and case.yaml (individual test cases). Case-level judge configuration takes precedence over global configuration via MergeJudgeConfig internal/judge/factory.go68-87 This allows specific cases to override models, thresholds, or even the judge type entirely.
For details, see Writing Evaluations (eval.yaml and case.yaml).
The evaluation pipeline can provision Model Context Protocol (MCP) servers using the mcp.Provisioner internal/mcp/provisioner_test.go34-44 Judges can verify if specific MCP tools were called using rule_based assertions like tool_called internal/judge/rule_based.go194-220
For details, see MCP (Model Context Protocol) Integration.
Every evaluation produces a judge.Result struct internal/judge/judge.go112-142 which maps directly to the grading.json output:
PASS, FAIL, SKIP, ERROR) internal/judge/judge.go17-28AssertionResult containing the text, pass/fail status, and concrete evidence for each criterion internal/judge/judge.go189-198passed, failed, and pass_rate internal/judge/judge.go205-210agent_judge, this preserves the agent.SessionResult of the LLM judge itself for debugging internal/judge/agent_judge.go189-190Sources: internal/judge/judge.go17-28 | internal/judge/judge.go112-142 | internal/judge/factory.go68-87 | internal/judge/agent_judge.go189-190
The system includes robust error handling for the judging phase. If an agent_judge fails (e.g., due to a timeout), the system attempts to recover the SessionResult using SessionResultFromError internal/judge/judge.go176-182 so that partial logs and partial JSON outputs are still available in the final report. AgentJudge also includes logic to repair or extract JSON from the judge's response even if the agent process returned an error internal/judge/agent_judge.go150-160
The report.html template visualizes these results, displaying the status badges and evidence strings for each assertion internal/report/templates/report.html77-81
Sources: internal/judge/judge.go156-182 | internal/judge/agent_judge.go150-160 | internal/report/templates/report.html77-81