/orchestra:design-simulated-environmentfrom orchestra
Builds a deterministic simulated environment with seeded state and a validator so any model can run an agentic workload end-to-end and be scored on final state. Use after understanding the workload.
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 coding agent writes this fresh for each workload — every workload's tools, state, and success criteria differ, so this skill is the recipe, not a fixed implementation. The goal: a deterministic, synthetic environment where any candidate model can run the whole agentic task and be scored on the final state, so you can compare frontier vs. local and hill-climb the local model.
Before building a codebase-specific environment, every new local specialist model should run in a tiny default environment so the user has an immediate, repeatable baseline:
list_records, read_record, write_note, update_status, and
finish. All tools mutate in-memory JSON only.This default env is not the customer's app and must not be presented as proof that local can replace the incumbent. It is the first-run calibration surface: "my local model can act in a deterministic tool world, and I can compare it to a frontier model." After that, inspect the repo/traces and build the workload-specific environment below.
A recorded replay (serve the teacher's captured tool_results back) only works for a model that reproduces the teacher's exact tool path. A different or smaller model takes its own reasonable trajectory and immediately "diverges" — there is no recording for the tools it actually called. So recorded replay can't fairly test a different brain. A simulated environment implements the tools against seeded state, so every call returns a real (synthetic) result and the run is judged by what got written, not by matching the teacher.
Build this only after ../understand-workload/SKILL.md
has produced the workload's purpose, tool catalog, inputs/outputs, and the success
criteria (recall / precision / policy — not just cost/speed).
When production traces are the source, first run the generic foundry in
../ingest-traces/SKILL.md. Its machine proposal,
source DAG, and human review become the evidence-backed starting point for this
simulation. Customer names and workload-specific assumptions must never enter
the generic compiler or viewer.
../capture-evidence/references/evaluation-evidence-gates.md.mcp__… prefix) so a
candidate's reasonable-but-different call still gets a useful answer.../recursive-language-model/SKILL.md)
and the route decision (../run-local-model-lab/SKILL.md).Checks beyond the scripted oracle, before any model score is trusted:
The verifier fixture-test rule. Before trusting any verifier, it must pass a two-fixture test: one known-valid result must pass and one plausible-but-wrong result must fail. Both fixtures live next to the verifier and rerun on every verifier change. A verifier that has never rejected a wrong answer has not been tested — do not score, regrade, or calibrate against it.
Strict-vs-dense divergence. Score every run with both the strict pass/fail and the partial-credit axes. When strict reads 0 while partial credit is high across many rows, the strict reward is underestimating real behavior — and as a training signal it would yield constant all-fail groups with no gradient. Measured on an internal synthetic workload, 2026-05-18 (strict pass-rate materially under-read behavior on a multi-step workload).
Reward-hacking sentinels. Plant runs the validator must reject: an empty/no-op trajectory, a plausible-but-wrong-values write, and a metric-gaming run (e.g. writing every record to inflate recall). Each must score near 0 — the precision and forbidden-write axes are what keep recall un-gameable. A validator that hasn't rejected a sentinel has not been tested.
The right-answer-wrong-contract sentinel. A run whose content is
correct but whose shape breaks the caller — the canonical case is the
gold answer as valid JSON wrapped in markdown fences, which leaves an
SDK's parsed .object undefined while every quality axis passes. Quality
must stay high and a separate contract axis must read 0 — proving the
validator separates "right answer" from "parseable in production"
(implementation in the example env's smoke.py).
Before any cross-model comparison, the environment must pass this checklist,
adapted from the Agentic Benchmark Checklist
(uiuc-kang-lab/agentic-benchmarks).
Canonical failures it prevents: a do-nothing agent scoring 38% on tau-bench,
SWE-Lancer agents reading protected answer files, WebArena string-match
exploits. Full mapping in
../../docs/benchmark-rigor.md.
finish, writes nothing) through the same driver and validator. If it
scores above ~5%, the benchmark is miscalibrated: too many obligations are
satisfied by default state, or the metric rewards absence. Fix the gold set
or the validator before trusting any model score.orchestra traces build-benchmark splits fixtures into
candidate-readable pre-state (fixtures.json, task_id-scoped) and
scorer-only post-state (gold.json, never served to a rollout), and runs a
tiered leakage audit — tier 1 verbatim matches are findings, tier 2 fuzzy
shingle/fingerprint matches are advisory — recorded report-only in
manifest.leakage_audit. Read that record first; keep the manual grep for
environments built any other way.verifiers envOne env, many uses: the same verifiers Environment serves eval, RL training,
synthetic-data generation, and agent-harness experimentation ("playgrounds for RL
training, evaluation benchmarking, synthetic data generation, and agent-harness
experimentation" — Prime Intellect, https://www.primeintellect.ai/blog/environments).
Run as an offline gate it is also the replay surface for
../simulate-before-launch/SKILL.md —
judging a proposed model/prompt change before traffic moves. That's why building
it well — and validating it cheaply via eval before any GPU — pays off across
all of them.
Four LEGO blocks (dataset · parser · rubric · rollout). A verifiers env snaps
together from four independently-swappable pieces (Will Brown / Prime Intellect):
prompt + gold answer + per-example info.The payoff is the seams — swap one brick, keep the rest: swap the dataset → new task; swap the model in the rollout → model comparison on the same harness; add a rubric function → reward something new; change the consumer → the same env runs as eval, RL training, or synthetic-data gen (one env, many uses). This is why the env is the durable asset and the trainer/model are swap-in bricks — how a run can change model (e.g. Gemma-4 → Nemotron-3) or trainer (eval → prime-rl) without rebuilding the env.
Caveat: the bricks look independent, but the parser must match the model (and the trainer's renderer must too) — that's the seam that breaks on a new model arch. When you swap the model brick, re-check the parser/renderer.
For trace-derived work, generate the environment through orchestra traces build-benchmark; do not begin from the legacy v0 example. The helper was
live-verified on 2026-07-29 against Prime Intellect Verifiers 0.2.1
(release commit ab65b6e8d34b03d162408d4bcb854430a86809e6). It emits the current typed
TasksetConfig/Taskset, per-rollout State, Toolset methods, strict and
dense rewards, HarnessConfig/Harness, and load_environment(EnvConfig)
package shape, with the audited commit recorded in the canonical benchmark.
The checked-in event-categorizer remains a legacy v0 compatibility example;
never copy it into a new trace-derived environment. Use the helper lifecycle in
../ingest-traces/references/trace-foundry-cli.md.
Re-audit upstream before changing the generator's commit pin, then smoke-install
and import the generated package against that exact commit.
A finished environment need not stay local-only. benchmark.v1 already
records external lineage via provenance.imported_from
(format: verifiers.v1 | verifiers.v0 | harbor | inspect_ai | automationbench | hf-dataset | other, plus ref/version/license), and
the same formats work in reverse as export targets:
task.toml carrying the task's semver version (the same
major/minor/patch contract as our task versioning) and dataset.toml
pinning inputs by sha256 digests. Our per-task version +
content_hashes map onto that shape directly.verifiers v1 environment (the shape orchestra traces build-benchmark
already generates) and publish to the Environments Hub; record the hub
slug and pinned version so a re-import round-trips through
imported_from.Manifests carry references and digests, never inline gold, prompts, or secrets — that rule holds for exports too.
End with: the seeded fixtures and gold set; the tool classes simulated; the validator's axes; the oracle's perfect score; and each candidate model's recall/precision/policy + cost/latency — with the local-model gap to close.
When starting from a portable JSONL training plan, first render
orchestra training goal-card --plan <plan.json> --preview 0 and validate the
resulting understudy.environment_proposal.v1 artifact. Increase the preview
only when useful; it is bounded to three TRAIN rows and never exposes held-out
targets. Model-authored environment proposals are design input only and remain
needs_verifier until the deterministic oracle, sentinels, reset, leakage,
live-effect, reward, hash, and parser gates pass.
references/trace-to-benchmark-foundry.md — machine-first trace compilation, review, promotion, and diminishing returns.references/automationbench-adaptation.md — reuse canonical stateful-benchmark patterns without losing trace provenance.references/resumable-environment-goal.md — automate trace batches with deterministic resumption and approval gates.references/cookbook-traces-to-env.md — the stage-by-stage recipe from captured traces/tests to a runnable verifiers env (gold policies, tool-stub strategies, contract rubric, playbook-as-argument, validator gates).examples/event-categorizer/ — complete synthetic scaffold: env module, tasks, swappable playbooks, capture converter, and an offline smoke.py verified against verifiers==0.2.0.../understand-workload/SKILL.md — produces the shape this simulates.../recursive-language-model/SKILL.md — the harness that lifts a small model's score in this env.../optimize-agentic-workload/SKILL.md — the agentic-workload metric axes and final-state validation.../prepare-verifier-handoff/references/stage-1-author-env.md — inverts this batch-scored env into a reset/step MDP when the workload needs RL (the direct next rung before a hosted handoff).../prepare-verifier-handoff/SKILL.md — when the env should graduate to a hosted RL/verifiers partner.../simulate-before-launch/SKILL.md — runs this env as the offline ship/no-ship gate for a proposed model or prompt change.examples/event-categorizer/README.md (opens in a new tab)examples/event-categorizer/configs/endpoints.toml (opens in a new tab)examples/event-categorizer/convert_captures.py (opens in a new tab)examples/event-categorizer/demo_gate.py (opens in a new tab)examples/event-categorizer/event_categorizer.py (opens in a new tab)examples/event-categorizer/mock_model_server.py (opens in a new tab)examples/event-categorizer/playbook-variant.md (opens in a new tab)examples/event-categorizer/playbook.md (opens in a new tab)examples/event-categorizer/pyproject.toml (opens in a new tab)examples/event-categorizer/smoke.py (opens in a new tab)examples/event-categorizer/tasks.jsonl (opens in a new tab)reference.md (opens in a new tab)references/automationbench-adaptation.md (opens in a new tab)references/cookbook-traces-to-env.md (opens in a new tab)references/resumable-environment-goal.md (opens in a new tab)references/trace-to-benchmark-foundry.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
43 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./check-routing-healthUse when a developer asks "is Orchestra causing my errors", "which workloads are routed", "is my routing config actually taking effect", "is my provider healthy", "are there 500s on staging", "what's our error rate", "where is my gateway spend going", or wants self-service diagnostics without asking the team. Reads the hosted reporting endpoints with the developer's sk_* key./compare-model-sweepUse when a developer wants to compare candidate models — any mix of local, gateway, or frontier — on the same eval and see quality, latency, cost, and reliability side by side. "Which model should I use", "sweep these models on my benchmark", "compare Gemma vs the frontier on my eval". To stand up and serve a local candidate first, use run-local-model-lab./compare-trajectoriesUse when you need to know HOW two model runs differ behaviorally on the same tasks, not just THAT one scores higher — per-task trajectory diffing that classifies the gap as persistence/recovery, knowledge, or format/parsing. "why does the bigger model pass these", "is this gap RL-shaped", "diff these two trajectory runs", "where do the trajectories diverge", "what would distillation buy me". The behavioral complement to compare-model-sweep.npx claudepluginhub understudylabs/orchestra-agent-tools --plugin orchestraOther plugins' skills for the same job