Skip to main content

Quality Evals

ProtoAgent includes a small prompt-profile evaluation harness in core/protoagent_core/quality_eval.py. It is designed to compare the small, medium, large, and api prompt profiles against fixed repository tasks.

Modes

ModeCommandPurpose
planproto-cli eval profiles --planPrint the profile/task matrix without running the core.
scaffoldproto-cli eval profilesRun prompt/context plumbing with PROTOAGENT_SCAFFOLD=1; no model calls.
liveproto-cli eval profiles --liveCall the selected model for each task/profile and score actual behavior.

Live mode passes no interactive progress bridge to the runtime. If Coder prepares a workspace write, ProtoLink still raises the approval request, but the Python bridge auto-denies it. This lets the eval measure whether Coder reached the approval boundary without applying file changes.

Examples

Run a fast scaffold smoke:

proto-cli eval profiles --limit 3

Run one live profile against one task:

proto-cli eval profiles --live --profile api --task approval-denial-regression

Emit JSON for later comparison:

proto-cli eval profiles --plan --json

List the built-in task set:

proto-cli eval tasks

Scoring

Each task declares:

FieldMeaning
expected_pathsSource/docs/test paths the response should discover or touch.
requires_explorerThe agent should use Explorer for repository evidence.
requires_coderThe agent should route changes to Coder.
requires_docsA docs path should be touched.
requires_testsA test path should be touched.
max_changed_filesGuardrail against broad, unfocused edits.

The scorer reads normalized RunEvents, approval requests, diff targets, and response text. It checks for Explorer delegation, Coder delegation or approval requests, expected path hits, docs/test coverage, and over-edit risk. Runtime also derives a RunContract for each live task. Missing Coder/write artifacts on a workspace-change task can now produce an incomplete run status, so eval failures in that area indicate runtime enforcement issues as well as prompt-profile issues.

Scaffold mode marks behavior checks as informational because no real agent delegation happens. Use live mode when tuning prompt profile quality.