Audience: contributors changing eval-magic itself. For installed-tool usage, start with
eval-magic --help; for harness authoring and dispatch isolation, runeval-magic docs.
eval-magic is a Rust CLI that builds reproducible skill-evaluation campaigns, hands dispatches to an agent harness, ingests what happened, grades the results, and preserves the evidence needed to compare conditions. This page is the repository map and documentation-placement policy for new contributors. It deliberately points to authoritative code, schemas, generated artifacts, and focused internal notes instead of duplicating their details.
eval-magic initscaffolds an eval workspace next to a skill. Eval definitions describe the task, fixtures, assertions, conditions, run count, and — for a multi-turn eval — either scripted follow-up turns or a responder policy that derives them.eval-magic runvalidates the configuration, resolves and copies the skill under test into the iteration, creates isolated task roots, stages the requested skill condition from that copy, snapshots the starting state, and writesRUNBOOK.md,dispatch.json, and related campaign artifacts. The iteration lives in the eval home, which defaults outside the skill's own repository (workspace_root_from,src/core/context.rs). The generated runbook—not a checked-in recipe—is the authority for dispatching that particular campaign.eval-magic dispatchruns every task through the selected harness,--jobsat a time, each in its own private environment. A scripted conversation resumes one native harness session across its turns. Each task ends with aconversation.json, which is also what a rerun skips on.eval-magic ingestreads the harness outputs, transcript evidence, guard denials, and final task state. Runner-owned deterministic checks and diff-scope evidence are collected here.eval-magic gradeevaluates runner-owned assertions and emits tasks for assertions that require an LLM.eval-magic dispatch --judgesruns those judge tasks through the selected harness.eval-magic finalizechecks that required work is complete and writes the final per-run and benchmark artifacts.eval-magic aggregatecombines campaigns when a larger comparison is needed.eval-magic teardownremoves staged skills and temporary guard configuration. Campaign artifacts remain available for audit and comparison.
Use each command's --help before changing a phase. It documents the current inputs, outputs,
preconditions, handoffs, and recovery commands.
src/main.rsis the thin binary entry point;src/lib.rsexposes reusable crate logic.src/cli/owns argument parsing, user-facing help, command handlers, and presentation. Library modules return data and warnings; the CLI decides what to print.src/pipeline/owns campaign phases and artifact assembly.src/adapters/loads harness descriptors and implements the shared adapter boundary plus the few named capabilities that require harness-specific code.src/sandbox/,src/workspace/, andsrc/validation/own task isolation, filesystem/workspace mechanics, and configuration checks.src/source/resolves a declared source — a git URL and ref, or a local directory — to a commit, and materializes it as a tree. It knows nothing about what is being sourced, so both the codebase a task environment is built from and the skills under test resolve through it.schema/contains the JSON schemas for user input and generated artifacts.harnesses/contains built-in descriptors, descriptor scaffolding, and embedded harness assets.profiles/contains shared prompt profiles.tests/cli/covers CLI and packaging contracts;tests/run/covers campaign behavior across the run boundary. Focused unit tests normally live beside the implementation.docs/guides/contains Markdown guides embedded in the binary. Other files underdocs/are internal contributor notes.
When prose and a machine-readable or generated surface disagree, fix the prose against the following authorities:
eval-magic <command> --helpfor the installed CLI contract.- The relevant file under
schema/for accepted fields and serialized artifact shapes. - Built-in and layered descriptor data for harness behavior. Use
eval-magic harness listto see registered harnesses andeval-magic harness show <label>to inspect the resolved descriptor. - A campaign's generated
RUNBOOK.md,dispatch.json, anddispatch-manifest.mdfor the exact commands and handoffs of that run. - Real harness
--help, vendor documentation, and observed output for descriptor values. Never infer one harness's flags or event shapes from another harness. - Tests and golden artifacts for behavior that crosses a module or CLI boundary.
| Tier | Platform | Verified by |
|---|---|---|
| Supported | Linux, macOS, Linux inside WSL | the ubuntu-latest CI job |
| Unsupported | native Windows | — |
Windows users run the Linux build inside Windows Subsystem for Linux (WSL). Keep the binary,
repository, eval workspaces, and harness processes inside the same WSL environment. dispatch
passes workspace-owned absolute paths to harness command lines, so crossing from a native Windows
process into WSL would change the filesystem namespace and invalidate those paths.
Do not add native Windows accommodations or release targets. Preserve support for Windows-shaped
paths only where they are data read from artifacts or transcripts; those portable-data contracts
do not imply native Windows runtime support. POSIX_TOOLING_REQUIREMENT (src/core/runtime.rs) is
the single wording every user-facing Markdown surface reuses. src/cli/help.rs restates it for
clap by hand.
Trace the user-visible behavior from the CLI handler into library-owned logic and artifacts before editing. Add a focused failing test at the narrowest useful boundary, implement the change, then run the focused test again. Cross-harness changes belong at shared descriptor, runner, or adapter boundaries unless the evidence requires a named harness capability.
Development requires Linux or macOS with a POSIX shell. Windows contributors clone the repository
and run the complete toolchain inside WSL; native Windows development is unsupported. The dispatch
tests spawn #!/bin/sh harness stubs through the resolved shell and do not skip, so the suite
cannot pass without one. Tests needing symlink creation report a skip instead;
EVAL_MAGIC_REQUIRE_POSIX_TOOLS=1 turns those skips into failures in CI.
Before handing work off, run:
cargo fmt --check
cargo build
cargo test
cargo clippy --all-targets -- -D warnings
git diff --check
Add schema checks, help snapshots, guide-contract tests, or golden-artifact verification when the changed surface calls for them.
Documentation is a shipped feature. Put each fact on the surface where its audience will look:
- CLI help (
src/cli/args.rsandsrc/cli/help.rs) is the primary discovery surface. Every command and flag needs enough context to use it correctly and find the next handoff. - Shipped guides are Markdown files directly under
docs/guides/.build.rsdiscovers every.mdfile at compile time: the filename stem is theeval-magic docs <topic>name, the first H1 is its listing title, and the complete file is embedded verbatim. Guide names must be ASCII kebab-case. Shipped output refers to guides witheval-magic docs <topic>, not repository paths. - Generated run documentation such as
RUNBOOK.mdis the authority for commands whose exact form depends on a campaign, harness, or model. Do not duplicate those recipes in static prose. - Internal development docs explain architecture, evidence, and maintenance contracts for contributors. They may link to repository paths, but installed-tool users must not depend on them.
Keep the README as a short landing page: what the tool is, how to install it, one successful first run, and where to continue. Distill operational detail into CLI help or a shipped guide; retain implementation evidence in an internal note.
- Harness progressive enhancements defines the baseline adapter contract, optional enhancements, fallbacks, and contribution boundaries.
- Claude Code notes, Cline notes, Codex notes, and OpenCode notes record harness-specific evidence and maintenance details.
- Shipped harness-authoring guide is the repository source for
eval-magic docs byoh. - Shipped isolation guide is the repository source for
eval-magic docs isolation. - Shipped codebase guide is the repository source for
eval-magic docs codebase. - Shipped conversations guide is the repository source for
eval-magic docs conversations.