/orchestra:understudyfrom orchestra
Orchestrates an improvement loop for LLM apps: trace → evaluate → optimize → compare → deploy. Use when asked to make an LLM app cheaper, faster, more reliable, or to compare/pick models.
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.
Orchestra is agent improvement infrastructure: it helps a coding agent improve its developer's LLM system from real traces. This skill is the orchestrator — it gives your agent the loop and routes each stage to exactly one worker skill. It does not do the work inline.
The loop is backend-agnostic: it can begin locally without registration, but the default route is the strongest active model and managed cloud execution when the developer has not selected Local. A dropped dataset authorizes analysis through the active model. Activating a named, bounded cloud workflow authorizes its normal uploads, provider calls, temporary resources, evaluation, receipts, and cleanup.
Keep these six separate and explicit — say them back before acting:
Show partial findings early ("found 3 LLM call sites"; "app uses LiteLLM, so gateway insertion is low-risk"; "no evals — I'll build a decision-sized harness"; "stated ZDR constraint blocks hosted upload unless approved").
Keep the user oriented and engaged across the loop's slow steps. Full doctrine in
../../docs/engagement-and-pacing.md; the
rules:
~/.understudy/profile.json and set
vocabulary, coaching depth, and opinion strength to match. Also read
~/.understudy/agent-card.json when the user asks whether their Orchestra is
active or how to talk to it; this card is the agent-facing runtime source of
truth for model endpoint, tmux session, companion status, and the exact local
chat command. No profile yet → run ../onboard/SKILL.md
first.Answer from the repo before asking the developer. Read package files, provider/
model wrappers, env vars, LLM SDK usage, agent frameworks, prompt files, eval and
test dirs, tracing/logging, deploy and CI config, and any compliance/README/
architecture docs. The repo-inspection and call-site checklist lives in
../capture-evidence/SKILL.md and its
reference.md.
Ask only what you genuinely cannot infer:
See reference.md for the intake, objective menus, constraints,
route-selection taxonomy, fresh-pricing rule, the report template, anti-patterns,
and worked examples.
Identify the developer's current stage and load exactly one:
--lower-my-ant-bill installer
path → ../lower-anthropic-bill/SKILL.md
first. It audits call sites, tokenizer risk, cache structure, batchability,
and route candidates before any code edits or provider calls.../inspect-billing-sources/SKILL.md.
This is optional evidence for lower-anthropic-bill and requires exact read
scope approval before email or browser access.~/.understudy/profile.json
is missing → ../onboard/SKILL.md (backgrounds a small
model, profiles the machine, interviews, writes the profile).../product-knowledge/SKILL.md.../understand-workload/SKILL.md.
Do this before head-to-head comparisons or optimization.../capture-evidence/SKILL.md
(also owns repo inspection + eval-harness discovery/build). For a named
workload already captured by Orchestra, the recommended route is
orchestra evals build: it downloads one raw workload day and hands that
source to the coding agent for local verifier authoring. Do not use the
legacy sampled-cohort evals create path for this workflow.../instrument/SKILL.md
(env-var redirect through the gateway, verified test call, then hands off
to ingest-traces).trace_id or says
"get this trace", "download the full trace", or "show every request in this
trace" → ../export-trace/SKILL.md. It resolves
request membership through the customer trace lookup API, exports captures
privately, and hands the local files to ingest-traces or the trace viewer.../ingest-traces/SKILL.md and its fleet
lenses (references/profile-captures.md for structure/cost,
references/lotus-semantic-triage.md for content-level bulk triage).
When the source is Desktop supervisor interventions, first run
orchestra desktop supervision export --reviewed-only --json; use its
content-addressed correction-pair JSONL as the local input and inspect the
accompanying attribution metrics. Unreviewed pairs may support error
analysis, but are not human-approved training labels.orchestra run, or registering an improved route →
../use-understudy-gateway/SKILL.md..env
provider keys, or skipping remote frontier calls →
../use-understudy-gateway/SKILL.md
and its frontier-keys lens (references/frontier-keys.md).../simulate-before-launch/SKILL.md.../ramp-and-verify/references/review-rollout.md.
This branch reads captured traffic; it does not change routes or run inference.../ramp-and-verify/SKILL.md.../check-routing-health/SKILL.md.../check-routing-health/SKILL.md.../share-savings/SKILL.md. Require the
metrics-only payload review and explicit approval before posting.../manage-local-models/SKILL.md.../run-local-model-lab/SKILL.md.orchestra runs execute --watch) alive, read
rigor-report.md, or run an app_replay regression after code edits →
../operate-benchmark-lab/SKILL.md
(MCP tools preferred; CLI verbs otherwise). For only the app-replay slice,
../replay-app-harness/SKILL.md.../compare-model-sweep/SKILL.md. When the
sweep verdict supports changing production traffic, don't stop at the report —
the answer to "how do I get this running in prod?" is
../ramp-and-verify/SKILL.md (add provider →
set route → staged ramp gated by the production validator).../compare-trajectories/SKILL.md and its
token-logprob lens (references/logprob-lens.md).../understand-workload/SKILL.md and its
tool-trace forensics lens (references/tool-trace-forensics.md).../local-distillation-lab/SKILL.md and
its pedagogical arm (references/pedagogical-arm.md).verifiers /
prime-rl path →
../recursive-language-model/SKILL.md
and its pedagogical-training lens (references/pedagogical-training.md).../plan-hosted-run/SKILL.md.../optimize-workload/SKILL.md.../optimize-agentic-workload/SKILL.md
(verifiers env or resettable sandbox, model A/B through the gateway,
prompt-GEPA for the cheap model).../prepare-verifier-handoff/SKILL.md
(decide → author env → package → hand off).Multi-turn or tool-use alone is NOT a handoff: agentic evaluation, A/B, and
prompt/route optimization stay local in optimize-agentic-workload. RLM policy
training routes to recursive-language-model (pedagogical training) first;
only external/hosted RL handoffs route to prepare-verifier-handoff. When in
doubt, route to capture-evidence — optimizing without a current
harness/metric/split/baseline creates false progress.
When the goal is "train an understudy" / "can a local model do this?", the orchestrator owns the ladder — sequence workers, don't reimplement them:
*-assistant
drafter checkpoints as standalone candidates.
Use ../manage-local-models/SKILL.md and
../run-local-model-lab/SKILL.md.../ladder/SKILL.md when the developer needs a no-data
local-vs-frontier feel test. Prefer the Orchestra managed catalog when the
frontier id is listed, so the comparison uses one gateway key and no provider
key handling. Preference is a gap signal, never a claim.capture-evidence; for workflow/tool tasks,
design-simulated-environment), with frontier as the incumbent baseline and
local as the candidate. Then write a gap report and let the gap pick the rung:
optimize-workload);design-simulated-environment);recursive-language-model);run-local-model-lab + use-understudy-gateway);Default to the path with the highest expected progress toward the stated
objective under the developer's hard constraints. Make spend, wall-clock, data
scope, expected evidence, and alternatives visible; do not silently choose the
weakest model, smallest cohort, or narrowest intervention because it is cheap.
Follow the outcome-first spend posture in reference.md. The
developer's direct request or activation of a named, bounded workflow is the
confirmation for its ordinary external writes, uploads, provider calls, spend,
temporary serving, evaluation, receipts, and cleanup. Do not add dry-run or
phase-by-phase approval gates. Ask again only before changing credentials,
writing to production business systems, or expanding the displayed data,
destination, spend, retention, or production-impact envelope.
Do not ask the developer to register, authenticate, paste secrets, or configure
provider keys before the local evidence loop has found a concrete need. When that
need exists, route through orchestra login --email rather than a pasted key.
Follow the public boundary in
../../docs/privacy-and-data-boundaries.md:
workload content may move through the active model and the provider named by an
activated workflow. Never print, commit, or transmit secrets, and honor hard
constraints the developer explicitly selected (SOC 2, ZDR, Local, approved
providers) — see reference.md.
Never claim a cost, latency, quality, or availability win without measured
before/after evidence, and never make pricing/availability claims from memory —
use fresh data and label assumptions (reference.md).
.understudy/capture-evidence/harness.json
.understudy/capture-evidence/environment.json
.understudy/capture-evidence/metric.json
.understudy/capture-evidence/splits.json
.understudy/capture-evidence/baseline.json
.understudy/experiments/<exp-id>/experiment.json
.understudy/experiments/<exp-id>/candidate.json
.understudy/experiments/<exp-id>/claim.json
.understudy/experiments/active # pointer to the active <exp-id>
capture-evidence creates or refreshes the first five — the workload
evidence every experiment runs against. Freshness is hash-bound:
baseline.json carries harness_sha256, metric_sha256, and splits_sha256;
any later change to the harness, metric, validator, or splits routes back to
capture-evidence.
An experiment is one measured episode over a frozen workload: an incumbent
baseline versus a candidate, under a pinned metric and split, producing a claim
and an outcome. It is the unit optimize-workload writes and the unit that
graduates into the knowledge base. Each experiment owns a directory under
.understudy/experiments/<exp-id>/; experiments/active names the one in
flight, so a workload can hold more than one without overwriting prior results.
experiment.json is the record of that episode:
{
"experiment_id": "exp-001",
"workload": "workload-001", // real id locally; anonymized only on promotion
"objective": "cost", // cost | speed | quality | reliability | compliance | weighted
"hypothesis": "Gemma-4-31b replaces the incumbent for triage tool-calls under break-even",
"pins": { // copied from baseline.json's hash-chain
"harness_sha256": "…",
"metric_sha256": "…",
"splits_sha256": "…"
},
"incumbent_model": "openai/gpt-4o",
"candidate_model": "google/gemma-4-31b-it",
"result": { "claim_ref": "claim.json", "quality_delta": null,
"p50_latency_delta_ms": null, "cost_per_1k_delta_usd": null },
"outcome": null, // success | partial | abandoned
"route_decision": null // ship-local | local-as-router | hybrid | remote
}
The record stores identity + input-pins + verdict — never a loop-step
counter. Where you are in the loop is derived: re-hash the artifacts on disk
and compare to pins (a changed hash means re-baseline); a present
candidate.json with a null outcome means you are at compare. The filesystem
and the pins are the truth, so the record cannot drift into reporting a step it
isn't at.
outcome, workload, incumbent_model, candidate_model, and the result
deltas mirror the type: experiment lab-note in the Orchestra knowledge
base — experiment.json is its un-anonymized, hash-pinned, live
precursor. When outcome is set, orchestra experiments promote writes a
lab-note draft locally from the record. It does not anonymize or upload: the
draft carries the real local values behind a review banner, and scrubbing
workload to workload-NNN, dropping real paths, and filling the cost/margin
fields the local record omits are part of the publish review. Publishing to a
shared repository is an upload — gate it like any other (see Safety Gates).
orchestra experiments newopens an experiment and copies the baseline hash-chain intopins;understudy nextreads the artifacts on disk plus the active experiment to report the loop step and the command to run next;orchestra experiments outcomerecords the verdict. Onoptimize-workload adapter run --executethe candidate is frozen into the active experiment directory automatically;orchestra experiments freezedoes it explicitly (and freezes a--claim-from <path>). The optimizer's working files stay under.understudy/optimize-workload/.
Removed Python-prototype commands and deleted draft skills are tracked in
../../docs/current-functionality.md. Do
not route to deleted skills or commands.
End with:
For a completed improvement, produce the Orchestra Agent Improvement Report
(template in reference.md).
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