adrianco/retort/evaluate-run
Claude Code and agent skill by adrianco/retort
- community
Checking that the SKILL.md file is still in the repository.
Evaluate a single retort experiment run. Score the generated code against the task's TASK.md requirements, run its build and tests, compute metrics, and emit a structured evaluation report plus a machine-readable findings file.
Install
npx vskill@latest install adrianco/retort/evaluate-runSKILL.md
Evaluate Retort Run
Overview
A retort run produces a workspace directory — generated source code for one factor-level combination — archived under <experiment>/runs/<cell>/rep<N>/. This skill evaluates that workspace against the task spec it was asked to implement, captures quantitative and qualitative findings, and writes results in a format comparable across runs.
This is the per-run counterpart to pourpoise's evaluate-attempt, adapted for retort's DoE structure: instead of ad-hoc attempts, each run is a point in a design matrix.
Parameters
- run_dir (required): Path to the archived run workspace, e.g.
experiment-1/runs/language=rust_model=opus_tooling=beads/rep2/ - output_file (optional, default:
{run_dir}/evaluation.md): Where to write the human-readable report - findings_file (optional, default:
{run_dir}/findings.jsonl): Where to write structured findings (one JSON object per line) suitable forfile-run-issues
Inputs You Can Rely On
Each run_dir is laid out by retort's LocalRunner and contains:
| File | Purpose | |
|---|---|---|
TASK.md | Task spec — the prompt the agent received. This is the "requirements" source of truth. | |
stack.json | {"language": ..., "agent": ..., "framework": ...} — the factor levels for this run | |
| All generated source files | Exactly as the agent left them | |
Possibly .beads/ | Only if tooling=beads was in effect — the agent used bd for tracking | |
| Possibly build artifacts | node_modules/, target/, __pycache__/, etc. |
The retort database (experiment-<N>/retort.db) also holds this run's ExperimentRun + RunResult rows. You MAY query it read-only for cross-checking scores; you MUST NOT write to it.
Steps
1. Verify the run workspace
Constraints:
- You MUST NOT modify any file in
run_dir. Run all commands read-only or in a temp copy. - You MUST handle the case where the run was marked failed (suffix
-failedon the directory). Evaluate what exists; note the failure up front.
2. Read the already-computed build/test/lint scores from retort.db
Do NOT re-run the build, tests, or linter. retort's scorers already ran them for this run during scoring and stored the results — re-running the toolchain (especially compiled/JVM languages) is the slowest part of evaluation and is pure duplication. Read the stored scores instead.
Fastest source — `{run_dir}/scores.json`. When the eval runs inline as a gate during retort run, the run isn't in retort.db yet, so the runner drops the just-computed mechanical scores into scores.json in the archive. If it exists, read it and skip the DB query:
If scores.json is absent (e.g. retroactive retort evaluate), fall back to the database.
The database is at <experiment>/retort.db. run_dir is runs/<cell>/<rep>, so walk up until you find retort.db (don't hard-code a level count — the nesting can vary). Match this run by the factors in stack.json plus the replicate (the trailing repN of run_dir, also in _meta.json):
Interpret the stored scores (all 0–1) — these stand in for re-running:
- `test_coverage` — coverage / pass-rate. 1.0 ⇒ build + all tests passed; 0.0 ⇒ tests did not execute (build or import failure — the test gate). Use this as the build+test signal.
- `code_quality` — lint/quality score. Use it for the Lint line.
- `defect_rate` —
1.0⇒ build+test succeeded.
Constraints:
- You MUST NOT re-run build/test/lint when these scores exist. Cite the score (e.g. "test_coverage=1.0 from retort.db") as evidence.
- Fallback — only if the DB or this run's row is absent (e.g. evaluating an un-scored archive): run the language's test command once (it builds too); skip the separate build and lint runs. Mark build/lint as derived. Use a 180s timeout; if a toolchain is missing, mark
unavailable, notfailed.
3. Extract requirements from TASK.md AND the agent's prompt
First: prefer a pinned requirement list. Per-run requirement extraction is non-deterministic (the same task yields different counts on different runs, which makes requirement_coverage non-comparable). So if the experiment ships a fixed list, you MUST use it verbatim. Walk up from run_dir (as you did for retort.db) to find REQUIREMENTS.json:
If REQUIREMENTS.json exists, its requirements[] array IS the checklist — use those exact ids and requirement texts, in that order, as the complete and only list. Do NOT add, drop, merge, or re-number any. The denominator (total) is fixed at len(requirements) for every run of this task. Skip the extraction below entirely; go straight to step 4. (how_to_verify on each entry tells you what evidence to look for.)
Otherwise (no pinned list), extract requirements as below.
The run must conform to the full prompt the agent was actually given. retort assembles that prompt as: "Read TASK.md … implement everything it asks for" + (a tooling instruction) + (only when a prompt factor was set) the contents of prompts/<level>.md. So there are up to two requirement sources:
- `TASK.md` — the task spec, always present. Parse into a checklist (
R1,R2, …). Typical patterns:
- Numbered lists (
1. Implement ...), "must"/"should" bullets, code-fenced API signatures.
- The prompt-factor file — only if
stack.jsonhaspromptset to something other thannone/absent. Then readprompts/<prompt>.mdfrom the experiment dir (whereworkspace.yamllives — walk up fromrun_dirlike you did forretort.db). Extract its additional, checkable instructions as prompt requirements (P1,P2, …) and verify the code/output followed them.
Ignore `prompts.txt` — it is a benchmark-template placeholder (it literally begins with #ignore this file), NOT the prompt retort gave the agent. Do not derive requirements from it.
Constraints:
- You MUST produce a deterministic list with stable IDs (
R<N>for TASK.md,P<N>for prompt-factor instructions) so comparisons across runs align. - You MUST NOT invent requirements not present in TASK.md or the prompt-factor file — these are the spec, not your expectations.
- You SHOULD group related bullets into a single requirement when the source is clearly a single ask.
- Most runs have no
promptfactor, so theP*list is usually empty — that's fine; TASK.md is then the whole spec.
4. Assess each requirement and prompt instruction
This is the conformance gate: a run that doesn't implement the spec (and follow the prompt) is a failure, so be accurate — cite evidence, don't guess.
For each R<N> (TASK.md) and each P<N> (prompt), classify as one of:
implemented— code clearly satisfies it, tests exercise itpartial— code attempts it but is incomplete or untestedmissing— no evidence in the codebasecannot-verify— you genuinely can't tell from the code (rare). Use sparingly with evidence.
Tests are non-negotiable: if test_coverage == 0 (tests did not run), the run already FAILS the test gate — that is always a failure, full stop. Note it up front and don't dress it up as cannot-verify.
Base the assessment on:
- The generated source (read key files)
- The stored
test_coveragefrom Step 2 (1.0 ⇒ build + all tests pass; 0.0 ⇒ tests did not execute, so treat unverified requirements ascannot-verify) - The grepped test/skip counts from Step 5
Constraints:
- You MUST cite concrete evidence for each classification: file path, symbol name, or test name.
- You MUST NOT score a requirement as
implementedsolely because it has a stub function. - You SHOULD note "enhancement beyond spec" separately — these aren't deductions but are worth surfacing.
5. Detect skipped / disabled tests
Skips inflate pass rates without verifying behavior. Count them:
Constraints:
- You MUST report
effective_tests = passed + failed(skipped excluded). - You MUST flag a
skipped_testfinding for each skip, even if the skip looks "reasonable" — the signal matters for cross-run comparison.
6. Compute run metrics
If cloc isn't available, fall back to a simple wc -l loop over source files for the language's extensions only. Never include node_modules, target, etc.
7. Invoke run-summary
Delegate architecture analysis to the run-summary skill:
This produces structured markdown under {run_dir}/summary/ covering modules, interfaces, and flow. Reference it from the final report rather than duplicating its content.
8. Write findings.jsonl
One JSON object per line, one object per finding. Schema:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/evaluate-run/SKILL.md
Popularity
- Repository stars
- 120
- Repository forks
- 7
- 7-day trend score
- 24
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/adrianco/retort/evaluate-run)