You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a second evaluator mode: a second LLM reads the run transcript and
grades qualitatively. The rule-based evaluator remains the gate; the
agent evaluator runs second (hybrid mode). Persist the agent rationale
to evaluation.json and surface it in the console report.
Background: rule-based evaluation is deterministic but shallow — it
can't judge code quality. An LLM-based evaluator complements it.
Out of scope
A new runner for the evaluator agent. Reuse runner-mastracode (or
the runner-claude-code from v1.1: add runner-claude-code package #2). Add an evaluator field to the
MCP profile; no new package.
Streaming partial grades. The evaluator runs once at end-of-run.
Files to add or modify
packages/evaluator/src/evaluator.ts — add evaluateHybrid and evaluateAgent functions. New AgentEvaluation type.
packages/evaluator/src/evaluator.spec.ts — new tests (with a
recorded agent response fixture).
packages/bench-cli/src/cli.ts — wire evaluator.type: agent | hybrid
from scenario frontmatter.
Steps
Define the AgentGrade schema:
{
verdict: 'pass'|'partial'|'fail';
rationale: string;// 2-5 sentences, plain text
confidence: number;// 0..1
evidence_refs: string[];// keys into the run transcript}
Issue #8 — Agent-based + hybrid evaluators
Task
Add a second evaluator mode: a second LLM reads the run transcript and
grades qualitatively. The rule-based evaluator remains the gate; the
agent evaluator runs second (hybrid mode). Persist the agent rationale
to
evaluation.jsonand surface it in the console report.Context
packages/evaluator/src/evaluator.tspackages/evaluator/specs/SPEC.mdpackages/agent-runner/src/result.tsdocs/evaluator.mdcan't judge code quality. An LLM-based evaluator complements it.
Out of scope
runner-mastracode(orthe
runner-claude-codefrom v1.1: add runner-claude-code package #2). Add anevaluatorfield to theMCP profile; no new package.
Files to add or modify
packages/evaluator/src/evaluator.ts— addevaluateHybridandevaluateAgentfunctions. NewAgentEvaluationtype.packages/evaluator/src/evaluator.spec.ts— new tests (with arecorded agent response fixture).
packages/evaluator/fixtures/agent-grade-pass.json(new)packages/evaluator/fixtures/agent-grade-partial.json(new)packages/evaluator/fixtures/agent-grade-fail.json(new)packages/evaluator/specs/SPEC.md— update.packages/bench-cli/src/cli.ts— wireevaluator.type: agent | hybridfrom scenario frontmatter.
Steps
AgentGradeschema:evaluateAgent({ run, scenario, llmClient }):messages) + "Grade this run as pass/partial/fail and explain."
AgentGrade.evaluateHybrid:fail, return immediately.evaluateAgent.failwith confidence > 0.8, in which case downgrade).Evaluationtype to include an optionalagent_evaluationfield.
--evaluator agent|hybrid|rule(defaultrule).Deliverables
evaluateAgentandevaluateHybridimplemented.Test plan
pnpm bench:run --scenario create-class-hello --evaluator hybridproduces anevaluation.jsonwith bothperRuleandagent_evaluation.Acceptance gate
pnpm verifyexits 0.agent_evaluationblock.Definition of done
evaluateAgentandevaluateHybridimplemented.--evaluatorflag works.pnpm verifyexits 0.feat(evaluator): agent-based + hybrid evaluators.Dependencies
Blocked by #1 (real runner with full transcripts needed for the agent
to grade from).