/orchestra:operate-benchmark-labfrom orchestra
Operates the full benchmark lifecycle: builds benchmarks from traces, runs models, reviews calibration, queues prompt experiments, and reads rigor reports via MCP server or CLI.
Ships in orchestra. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
The operator's manual for the whole benchmark/experiment lifecycle a coding
agent can drive end to end. Two interfaces over the same sidecar files:
the benchmarks MCP server (preferred for agents — same validation code as
the hub API) and the CLI verbs. Execution always happens in a separate
executor process; the MCP server and hub never run models. Command matrix,
artifact map, and daemon details in reference.md; the tool
table and agent loop in docs/agent-operator-surface.md.
Prefer the installed orchestra binary. If it is unavailable inside a repo
checkout, run through the package script:
npm run build
node dist/bin.js benchmarks mcp --root <dir>
MCP registration (Claude Code ~/.claude.json → mcpServers):
{ "understudy-benchmarks": { "type": "stdio", "command": "understudy", "args": ["benchmarks", "mcp"] } }
— or let the CLI write it: claude mcp add --scope user understudy-benchmarks -- orchestra benchmarks mcp
(--scope user matches the top-level entry above; the default local scope is per-project).
Default root ~/.understudy/benchmarks; add --root per extra directory.
queue_run / orchestra runs queue only
writes a request file. Model rollouts spend gateway money only when an
executor picks the request up; say which executor will, before queueing.~/.understudy/trust.json (orchestra trust set, levels local_sandbox
< bounded_experiments < hosted_ops). At bounded_experiments+ they
proceed with a visible one-line notice (arm count, rough cost) — surface
that notice to the user, then keep moving. Below that, the guard returns
the one action to offer (orchestra trust set bounded_experiments);
confirm: true after explicit in-chat consent stays a per-call escape
hatch. There is NO default spend cap: the posture's
allow_spend_usd_per_run is an opt-in generous stop-loss (warn at 1x with
a recorded spend_warning; hard stop only at 2x with spend_stop). When
offering the raise, offer it with the flag: orchestra trust set bounded_experiments --spend-stop-loss <usd>, sized to roughly 2x the
estimated matrix cost. The stop-loss counts recorded costs only, so arms
that report no cost never trip it. The guard and notice run in the chat
tools and the benchmarks MCP server; orchestra runs queue has neither,
so on that path state arms x tasks x rollouts and the rough cost yourself
before queueing.arm_fallback event plus fallback_reason on
every row. Report the fallback; never present a fallen-back arm as a local
measurement.runs execute --watch,
check for a live claim (claimed_by on the request, executor_version on
events) — a stale watcher built before a feature landed is the classic
corruption hazard; new requests carry requires:[...] so old executors skip
them with run_unsupported instead of running them bare.reviews.jsonl/feedback.jsonl lines in place. Generated tasks are born
accepted (review-policy default_decision: "accept") — reviews.jsonl
carries explicit overrides only. apply_auto_accepts matters only for
benchmarks opted into default_decision: "pending", and is itself the
explicit user action — invoke it only when the developer asked.rollout_timeout,
app_replay_unobserved, structural sentinels) are excluded from aggregates
but reported, never fabricated as scores. Overlapping CIs are a tie.When the requested result is “meet or beat the incumbent” rather than merely “run this model,” operate one hash-bound decision loop:
target_met on dev is a candidate-selection result,
not production evidence.The exact contracts, failure boundaries, and current executor integration
status are in references/outcome-first-replacement-loop.md.
The method-ladder decision contract is in
references/method-ladder.md.
profile_workload scans it locally
(payloads unread, nothing leaves the machine) and lists
foundry-consumable dataset candidates. Discuss what the workload is,
confirm the dataset and label/input columns with the user, then
from_dataset compiles it into a PROPOSED benchmark (review-pending,
executable: false) whose tasks land in the review inbox. Never queue a
run from an intake — the user reviews the proposal first (step 2).
0.5. Interview before bulk authoring. Never batch-author tasks straight
from an intake or trace corpus. First, from the trace clusters, propose
2–3 capability directions, each as a card: Name (the capability
being measured), Example (one concrete task drawn from the traces),
Tests (what the verifier would check), Needs (dependencies —
services, fixtures, tools the environment must supply). The user picks a
direction, then approves a posture per dependency: live (real
service; usually wrong for a benchmark), frozen (recorded responses), or
simulated (seeded synthetic implementation). Then build one task
first: run it end to end and audit both trajectories — the agent's
(did the environment answer sensibly, did the task make sense) and the
verifier's (did scoring reflect what actually happened). Fixture-test the
verifier (one valid pass, one plausible-wrong fail — see Safety Gates).
Only after that pilot task survives audit do you batch-author the rest.orchestra traces build-benchmark, then
orchestra traces author-tasks (gateway) for legible task definitions.
The generated environment already ships the fixtures pre/post split
(candidate-readable fixtures.json vs scorer-only gold.json) and the
tiered gold-leakage audit (tier 1 verbatim findings, tier 2 fuzzy
advisory) recorded in manifest.leakage_audit — read it, don't re-derive.list_benchmarks → read_benchmark →
read_task. Generated tasks are accepted by default — nothing to apply.
read_benchmark returns each task's effective_decision plus
attention_flags (low confidence, self-check, incumbent-failed, schema
conflict, anomaly): work the flagged tasks, tweaking via submit_feedback
or overriding via submit_review
(reject | needs_more | restrict, or accept to re-accept an overridden
task; newest line per task wins). apply_auto_accepts exists only for
benchmarks running review-policy.json default_decision: "pending"
(the old explicit-accept flow).
Task or environment wrong? submit_feedback appends the ledger entry and
returns the regenerate-env handoff (orchestra traces regenerate-env).orchestra benchmarks rigor <dir> --ci (nonzero exit = findings to fix
first), then orchestra traces promote unlocks full runs.
Queue the incumbent (--incumbent / incumbent_models) plus
trivial_arms: ["null_agent", "spam_agent"]. Read calibration.json:
null_floor/spam_floor with floor_exceeded: true (> 5%) names the
passed_task_ids to fix; incumbent-failed tasks are flagged suspect —
fix the benchmark before trusting any candidate score.queue_run with candidate
models; prompt experiments ride prompt_overrides
(--prompt-override <arm_label>=<model>=<suffix-file>, e.g. an SOP
suffix appended to each task's system prompt) so prompt and model arms
land in the same run under distinct arm labels.orchestra runs execute --benchmark <dir> --watch (daemon; polls every
30s) or omit --watch for a single pass. Poll run_status until rows
land; rollout_timeout kills hung rollouts into anomaly rows.read_rollout / diff_rollouts
(tool_sequence.diverges_at, unmet obligations), then
orchestra benchmarks rigor <dir> → rigor-report.md — the ABC
attestation (oracle solvability, floors, calibration, contract
complexity, anomalies, contamination provenance; honest UNKNOWN rows for
unchecked items). Bootstrap CIs per docs/benchmark-rigor.md.app_replay arm via ../replay-app-harness/SKILL.md
— same frozen tasks, current code, rows never feed calibration.Every task carries an optional semver version plus content_hashes
(env_sha256, verifier_sha256, meta_sha256) — three canonical-JSON
sha256 hashes over the field groups defined in docs/benchmark-rigor.md.
The contract (mirrors Harbor's model):
| Changed group | Bump | Consequence |
|---|---|---|
| env (instruction, fixtures, tool surface, seed, unknown fields) | MAJOR | rerun — old trajectories are invalid |
| verifier (gold refs, contract/rubric, metric config) | MINOR | regrade — trajectories stand, re-score them |
| meta (title, docs, tags) | PATCH | reuse — existing rows as-is |
Benchmark-level version is the max bump across tasks (added tasks = MAJOR,
removed = MINOR). Every bump appends one
understudy.benchmark_version.v1 line to versions.jsonl (append-only
sidecar; records the bump, per-task reasons, splits hash, contamination
status).
Operate it with three verbs:
orchestra runs regrade --benchmark <dir> [--run <id>] [--task <id>...] [--dry-run] — verifier-only change: re-scores retained trajectory
evidence offline against the CURRENT verifier and writes fresh rows under
<run>-regrade-<n> (source-run provenance, original cost/latency
preserved), then appends one MINOR versions.jsonl line for the regraded
tasks so the superseded source rows go stale instead of double-counting
next to their regrades. Never queues rollouts, never spends gateway
money. If you're about to rerun after a gold/rubric fix, stop — regrade
instead.orchestra benchmarks upgrade <dir> --against <old-benchmark.json> —
diffs the current manifest against the archived previous one and prints
the minimal plan first: which task ids rerun, which regrade, which
reuse, and the resulting version bump; then appends one
versions.jsonl line (--dry-run skips the append). Nothing executes;
--queue --model <id> writes run requests for the rerun set only.orchestra benchmarks rigor <dir>... --ci — the gate before
orchestra traces promote and before publishing any new version: exits
nonzero on hard findings (floors exceeded, oracle unsolved, verbatim
leakage, contamination) instead of just writing the report; UNKNOWN is
fatal only with --strict. Run it in the upgrade path too — a version
bump that fails rigor does not promote (traces promote enforces this;
--override-rigor <reason> is recorded in the promotion record).Leaderboard staleness. A row is stale when it predates the newest
breaking bump for its task (MAJOR or MINOR line in versions.jsonl; rows
without created_at are conservatively stale). MAJOR means stale —
rerun (the trajectory itself is invalid); MINOR means stale — regrade
(trajectory reusable, score not); PATCH-only changes leave rows current.
Report stale rows the honest-reporting way: excluded from headline
aggregates, counted and named, never silently dropped or silently included.
ps/events for a live runs execute watcher; the first
stderr line prints executor version <v> (pid <n>). A live foreign claim
is respected; a dead claim is taken over (staleness takeover).orchestra runs execute --benchmark <dir> --watch in the
background; single-pass (no --watch) for one drain. Stop safely by
killing the watcher between polls — requests are re-claimable; in-flight
rollouts past the timeout become anomaly rows, never silent hangs.orchestra daemon status pid-checks and health-probes
~/.understudy/agent-card.json; then orchestra desktop capabilities /
status / model|slot|download|chat verbs. See
reference.md for what the app covers vs headless CLI.End with: benchmark dir and stage (proposed/promoted); current benchmark
version (semver, from the manifest / last versions.jsonl line) and
stale-row status (rows counted by current / stale-regrade / stale-rerun,
and whether any stale rows sit in a headline aggregate); ledger state
(reviews, auto-accepts, feedback); calibration verdict (incumbent gate,
null/spam floors, suspects); runs queued/executed and by which executor
version; result type (validation, oracle, live, app-replay); artifact paths
written (calibration.json, rigor-report.md, rows-*.jsonl,
versions.jsonl); and one recommended next command.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub understudylabs/orchestra-agent-tools --plugin orchestra43 skills in this plugin
/audit-verifier-reliabilityUse when deciding whether a verifier reward is trustworthy for optimization./calibrate-difficultyMeasure per-band model headroom from a local, source-bound run artifact before investing in training./capture-evidenceUse when a developer wants to build an eval from their real LLM app before changing anything — "measure how my app is doing today", "build an eval from my workload", "we have no baseline", "is my current model actually good". Turns the workload into auditable local artifacts (harness, metric, frozen splits, baseline); has a public-benchmark on-ramp when no traces exist.Other plugins' skills for the same job