Evaluating treatments (docs, MCP, skills, agent profiles)¶
The original LLM benchmark answers one question — do retrieved docs improve
answers? — by comparing two arms, with_docs and without_docs. The
treatment-arm framework generalizes that to an N-way comparison so you can
measure the marginal value of any context-augmentation artifact:
| Arm spec | Scenario | What it changes |
|---|---|---|
baseline |
control | nothing (the old without_docs) |
docs / docs:<doc-source> |
documentation injection | injects retrieved doc chunks (the old with_docs) |
mcp:<ref> |
MCP doc server | retrieves docs through a real MCP server |
profile:<path> |
agent persona prompt | swaps the answering agent's system prompt |
skill:<path> |
agent skill | injects a SKILL.md as context |
agent[:source] |
agentic doc use | gives the model a doc-search tool; it decides when to call it |
skill-agent:<path> |
agentic skill use | offers the skill via progressive disclosure |
skill-catalog:<dir> |
agentic skill selection | offers every skill under <dir> (a template/ copy, a byte-identical mirror that loads under the same skill name, and anything under a vendored or VCS directory such as .git or node_modules are left out); scores the one loaded against expected_skill |
<spec1>+<spec2>[+...] |
combined treatment | merges multiple treatments into one arm (e.g., docs+skill:path) |
The last two run through a tool-calling loop
(eval/agent_runner.py): the model
decides whether to query docs or load a skill, and the report records how often
it actually did (the faithful test of whether a doc source or skill is usable by
an agent, not just whether its text is relevant). The rest are single-shot.
Each arm is a Treatment that produces
an AgentConfig (system prompt + injected context) per question. The answers
are scored by the same LLM-as-judge used elsewhere, and the report shows each
arm's average score and its delta vs the baseline arm.
The judge scores each answer against the material its arm was given: the full
injected chunks for docs, the skill body plus its bundled-file list for
skill:, and the same body and list for skill_agent:, whose agent reads them
only through a tool. A skill-catalog: arm gives the bodies of the skills its agent
loaded plus every catalog file list (see Skill selection).
baseline, mcp_agent: and profile: arms give it none.
The output records this as judge_context: treatment_material.v1 when every
score saw the stored material, and judge_context_sources counts the scores by
source. The artifact keeps the material: each arm record names its text by digest
(judge_context_sha256) and judge_materials holds one copy of each distinct
text — a skill arm's, identical for every question, is stored once (about 4,500
characters for the perf skill, +0.3% for the text itself on an 81-question run;
each arm record and stored score also carries a 108-byte digest line, about 2% more
for a baseline plus skill run). The material is kept whether or not arms run was
given --judge. For docs arms, the material is the retrieved chunks, rarely
identical across questions, so each question adds its own copy (up to the
15,000-char cut); on a synthetic 20-question docs run the artifact grew from
93,209 to 392,852 bytes (4.2x). Sharing an arms artifact shares the skill or doc
text it contains. With eval judge agreement --judges, the judge is given the same text
through JudgeContextStore.from_artifact, which skips any text that does not
match its digest. Question ids must be unique for this (a question with no id is
given a positional one; duplicated ids are refused).
Scores that fell back to the 200-character report snippets leave the run unstamped
if all of them did — the protocol runs used before the stamp existed — and stamp it
treatment_material.v1+snippet_fallback if only some did, which pools with nothing.
A baseline arm's empty material always counts as stored, so with a baseline arm a
fallback gives the mixed stamp. To compare with an older run, written before
judge_materials, run answering and judging again: re-judging that file sees only
the snippets.
To measure how much the material itself moves the judge, run with --judge
and --judge-context baseline (on arms run or arms matrix-run). The flag is refused
without --judge, since an answers-only run would keep the withheld text in place of the
material. The judge is then
shown no material on any arm, the context a baseline arm's judge sees, so every
arm is judged on one context. The answering path is unchanged. The output is
stamped treatment_material.withheld.v1, which pools only with other withheld
runs. Partial artifacts saved before judging also keep this stamp. Rejudging a
withheld artifact still supplies no treatment material when a stored context
is missing. Its stored scores can be included in eval judge agreement with
pairwise or checklist results, whose judges see the answers alone. The default,
--judge-context arm, is the material protocol above.
What this changes is the evidence the judge has, not how well it separates good
answers from bad ones. On 81 skill-arm answers to the perf golden set (Haiku 4.5
judge, 24 bases, one run), the full material raised the mean intact score from
85.9 to 89.9, while pairwise accuracy on deterministic degradations went from
0.869 to 0.808: better on an appended contradiction of the skill (score drop
+11.5, 20/24 pairs, sign test p = 0.002), worse on wrong tool names (0.891 →
0.674, not significant at this size), unchanged on wrong numbers. A skill arm's
delta measured with the material is therefore on a higher level than one
measured without it, and the difference between the two is not evidence that
the skill helps. eval judge validate passes no context by default; run it on an
arms artifact with --context stored to gate the judge the way it scored the
arms — each answer with its arm's stored material (bases with no stored entry are
dropped and counted, except baseline with the no-context marker). It exits 2
with a typed scorer or --mode pairwise, on a file with no non-empty verified
material, when an arm loses all its bases, has only padding pairs or gets none sampled by --bases,
when a --sequential run would pass with none of an arm's bases scored, or
when no pair is usable.
Runtime plugins are a separate run dimension, not arms. They modify every arm
inside the same (model, harness, plugin_set) cell, and the JSON/Markdown
outputs stamp harness, plugin_set, plugin_set_id, and concrete plugin
metadata. The initial supported plugin is plugin:caveman[:lite|full|ultra],
which adds a brevity system instruction before answer generation. Enable a
plugin for every arm of a run with arms run --plugins plugin:<name>
(comma-separated for several).
Plugin effects are computed from paired runs, not from one artifact in
isolation. Run the same product, questions, arms, model, provider, and harness
once with no plugin and once with the plugin enabled, then compare the two
arms.v1 artifacts:
python cli.py arms plugin-delta \
--baseline results/arms/oneTBB-none.json \
--plugin-json results/arms/oneTBB-caveman.json \
--out results/arms/oneTBB-caveman-delta.json
The command writes a plugin_delta.v1 artifact plus a Markdown report with
judge-score deltas, token/cost deltas, and answer-length deltas. It refuses
confounded comparisons where model, provider, harness, arms, baseline arm, or
question IDs, order or text differ, including when only one run records question
text. It also refuses runs whose run_config budgets or sampling settings
differ, or where only one run pinned a seed; seed values may differ. A pair
where only one run records run_config gets a warning instead.
For each arm, the sets of recorded profile prompt digests must match if
both runs record any. Digests must also match within each paired answer that
has a digest in both runs. A check with digests on just one side is skipped
without a warning. Judged artifacts
must carry the same judge model, provider, context protocol, reference answers,
and any recorded judge prompt digest, temperature and resolved model snapshots.
Pairs are refused when only one run records a non-null judge setting. An
omitted setting and an explicit null compare as equal. The plugin-delta and
matrix rollup reports warn about omitted setting fields and null judge prompt
digests. Missing question text in both runs for a pair also gives a warning.
Naming: an agent profile (
profile:) is the answering agent's system prompt. It is not apersona— in this repo a persona is a synthetic user who asks questions (dokimi/personas).One arm, no docs:
--arm baselinealone is a knowledge run, the reference for a comparison; see knowledge-runs.md.Which commands run treatments:
arms run,arms matrix-run, and thesubjectscommands — they are the only callers ofcreate_treatments. The legacy answer path (benchmark run,answers generate) predates arms: it has only the two fixedwith_docs/without_docsconditions, no--armflag, and no way to send a system prompt at all, so aprofile:arm cannot be expressed there.explore --armis an unrelated flag (oracle/empty/command:), not a treatment list.
Quick start¶
python cli.py arms run \
--product oneTBB \
--questions <content-checkout>/questions/onetbb_golden.json \
--arm "baseline,docs,profile:data/agent_profiles/concise_expert.md,skill:<content-checkout>/skills/onetbb-quickstart" \
--judge \
--out results/arms/oneTBB.json \
--out-md results/arms/oneTBB.md
Question sets and product skills are evaluation content: they are not committed
here, so every example below names them as <content-checkout>/… — a checkout of
your own content repository. Agent profiles under data/agent_profiles/ and
data/skills/fastcontext/ are the fixtures this repo does commit.
external-content.md shows how to lay such a checkout out
and how to check it loads before spending money on a run.
Without --judge the command only generates answers (cheap, no judge calls).
Outputs default to results/arms/<product>.{json,md} (ignored by git).
While it answers, the run keeps the questions done so far in <out stem>.partial.json beside
the --out file, rewritten after each question and removed once the whole run is saved. A run
killed or crashed before that save leaves it behind: an arms.v1 file with a partial block
(questions_requested, questions_recorded) and the answers paid for, none judged. It never
replaces a file (a name that holds one, finished, left by a crashed run or taken by a run going on at the
same time, is passed over for <out stem>.partial2.json),
and the commands that read arms files refuse it. There is no resume: rerun the command.
arms matrix-run keeps one per cell, cells/<cell>.partial.json.
For single-turn model calls without tools, set DOKIMI_RESPONSE_CACHE before
the first attempt and keep that directory for the rerun. The rerun can reuse
cached answers for identical requests and marks them as replays. The original
checkpoint stays available for inspection.
Example Caveman plugin cell:
mkdir -p results/arms
cat > results/arms/matrix.json <<'JSON'
{
"matrix": {
"cells": [
{
"id": "openclaw-no-plugin",
"model": "gpt-6.1-sol",
"provider": "openai",
"harness": "arms-runner",
"plugins": []
},
{
"id": "openclaw-caveman",
"model": "gpt-6.1-sol",
"provider": "openai",
"harness": "arms-runner",
"plugins": ["plugin:caveman"]
}
]
}
}
JSON
python cli.py arms matrix-run \
--product oneTBB \
--questions <content-checkout>/questions/onetbb_golden.json \
--arm "baseline,docs,skill:<content-checkout>/skills/onetbb-quickstart" \
--matrix-cells results/arms/matrix.json \
--judge \
--out-dir results/arms/oneTBB-matrix
--matrix-cells accepts JSON shaped as {"matrix": {"cells": [...]}},
{"cells": [...]}, or a top-level list. Each cell can use id or
name as its identifier. A selected cell controls model, provider,
harness, and plugins, and the run refuses unsupported plugin/harness
combinations before calling the model. arms matrix-run writes one arms.v1
artifact per cell, a matrix_rollup.v1 JSON/Markdown report, and paired
plugin_delta.v1 artifacts for no-plugin/plugin cells that only differ by
plugin_set.
Arm specs in detail¶
docs:<doc-source>—<doc-source>is anythingcreate_doc_source_clientaccepts:context7(default),local:<path>,url:<url>, ormcp:<ref>. Baredocsuses Context7.-
mcp:<ref>— retrieve through a real MCP server.<ref>is<transport>=<target>[;opt=val...]:mcp:cmd=npx -y @upstash/context7-mcp(stdio)mcp:http=https://mcp.context7.com/mcp;tool=get-library-docs(streamable HTTP)mcp:sse=https://example.com/sse;id=uxlfoundation/oneTBB(SSE)
Options:
tool=(docs tool name),resolve=(resolve tool),id=(fixed library id). Requires the optionalmcpSDK:pip install mcp. -
profile:<path>— a Markdown file; the body (frontmatter stripped) is the system prompt. Seedata/agent_profiles/concise_expert.md. The arm is named after the frontmatterid, not the path: an arm passed asprofile:data/agent_profiles/concise_expert.mdappears in reports and in--baseline-armasprofile:concise_expert, and a file renamed without touching itsidkeeps the old arm name. With no frontmatter — or with malformed YAML, which is ignored silently — the id falls back to the filename stem, so name profile files after their id.Because the arm name comes from the id, editing a profile in place does not change the arm name: old and new cells look identical in a report. Each answer therefore records
profile_path,profile_prompt_chars, andprofile_prompt_sha256(a digest of the prompt text, not the file, since the text is what reaches the model). Compare that digest across a batch before pooling cells — differing digests mean two different prompts were measured under one arm name. On a combined arm the same three fields live one level down, under the matching entry ofmetadata["treatments"]rather than at the top of the metadata — so anything reading them has to look in both places,prompt_digests()included.The prompt is capped at 12,000 characters, the same cap
skill:applies to a skill body. The parity is the point: comparing the system-prompt channel against the context channel only means something if one side cannot carry a payload the other would have had truncated. A capped arm recordsprofile_prompt_truncated: truealongsideprofile_prompt_chars(sent) andprofile_prompt_chars_source(on disk), logs a warning, and digests the rendered text — so a truncated cell is visibly a different treatment rather than a quietly shorter one.skill:arms recordskill_truncatedon the same terms, with three sizes rather than two:skill_chars(body after the cap) pairs withskill_chars_source(body on disk) the way the profile fields do, whileskill_chars_injectedis the whole rendered block — header and description included, which is why it exceeds the source for a skill that was never truncated and is not the number to compare against the cap.ViewSkillToolrecordsskill_file_truncated/skill_file_chars_sourcewhen an agent views a bundled file that exceeds the cap.profile_prompt_sha256is the profile's contribution, not always the whole prompt sent: aprompt_middlewareplugin appends to the system prompt after the arm has already digested it.PluginWrappedTreatmenttherefore also recordssystem_prompt_sha256(the prompt as it leaves the wrapper) andsystem_prompt_extended_by_plugins, so a caveman cell and a bare profile cell are distinguishable in the artifact instead of sharing one profile digest.Where 12,000 comes from: it is the default the skill loader has always carried (≈3k tokens), an inherited convention rather than a tuned figure — no design note or commit justifies the number, and profiles adopted it for parity, not because it is optimal. Read it as a guardrail against a fixture that would dominate the prompt. If you change it, change it in all channels at once (
skills/loader.py,agent_profiles/loader.py,treatments/arms.py,treatments/tools.py,scripts/sync_skilltext_profile.py): an unequal cap turns the channel comparison into a payload comparison. Raising it also re-truncates nothing retroactively — already-scored cells keep their old digests.Two tests guard the cap, and it is worth knowing exactly what each covers:
test_no_injected_fixture_is_within_5_percent_of_the_capscans the injected payloads — every profile body and everySKILL.mdbody underdata/— and fails at 95%, so a fixture is caught while it is still growing rather than after it truncates. Its message prints the current largest fixture, so no percentage is hardcoded anywhere. It also fails when either channel has no fixture at all: a scan over an empty directory would otherwise report success while measuring nothing.test_over_cap_bundled_resources_are_knowncovers the third channel, the bundled filesViewSkillToolserves. These are not in the injected scan. ItsOVER_CAP_RESOURCESallowlist is currently empty — no committed resource exceeds the cap — and anything new going over fails the test until it is split or listed there with a reason, which keeps a truncation visible in code instead of silent.- Neither test sees a skill in an external content checkout. A skill you pass as
skill:<path>is capped the same way at run time and recordsskill_truncated/skill_chars_source, so check those fields in the artifact.
-
skill:<path>— aSKILL.mdfile or its directory, following the Agent Skills convention (frontmattername/description+ Markdown body). Seedata/skills/fastcontext/SKILL.mdfor the shape; product skills come from a content checkout. agent[:<doc-source>]— agentic doc use. The model is given asearch_documentationtool over<doc-source>(defaultcontext7) and chooses when and what to query. Tune the loop with--max-iterations.skill-agent:<path>— agentic skill use. The model sees only the skill's name + one-line description and calls aview_skill_*tool to load the full instructions on demand (progressive disclosure).skill-catalog:<dir>— skill selection. Every skill under<dir>is offered the same way, so the question is answered among its rivals. ASKILL.mdunder atemplate/ortemplates/directory, at any depth below<dir>, is not a skill and is skipped (a real skill kept under such a directory is skipped too). Vendored and VCS directories (.git,.hg,.svn,node_modules,site-packages,.venv,venv,.tox,.nox,__pycache__) below<dir>are not walked, and no note says so. ASKILL.mdbyte-identical to another under<dir>that loads under the same skill name (a plugin's copy ofskills/) is offered once. Questions that carryexpected_skillare scored on the skill loaded first; see Skill selection.<spec1>+<spec2>— combined treatment. Merges multiple treatments into a single arm by concatenating their contexts. Example:docs+skill:<content-checkout>/skills/onetbb-quickstartretrieves docs AND injects the skill, allowing measurement of synergistic effects. The+operator works between any treatment types exceptbaseline. A+only starts a new part when the text after it starts a known kind, so a path may contain+(skill:/skills/c++-guide); a spec that starts withmcp:is never split, because an MCP URL may carry+in its query.
Specs are not names. --arm takes specs; the artifact's arms list, the
report and --baseline-arm use arm names: docs:<source> is named docs,
mcp:<ref> is mcp_doc, agent[:<source>] is agent, and profile:,
skill: and skill-agent: arms are named after the content they load —
profile:<frontmatter id>, skill:<skill name>, skill_agent:<skill name> (note
the underscore); a skill-catalog:<dir> arm is named skill_catalog:<dir>, after
its argument, so two catalogs of one size can run side by side. A combined arm is named by joining its parts' names with +.
The grammar lives in
treatments/specs.py.
Example comparing injection vs agentic use of the same MCP server:
python cli.py arms run --product oneTBB --questions <content-checkout>/questions/onetbb_golden.json \
--arm "baseline,mcp:http=https://mcp.context7.com/mcp,agent:mcp:http=https://mcp.context7.com/mcp" \
--judge --max-iterations 6
Example testing combined treatments (docs + skill together):
QUESTIONS=<content-checkout>/questions/onetbb_golden.json
SKILL=<content-checkout>/skills/onetbb-quickstart
# 4-way comparison: baseline, docs-only, skill-only, and docs+skill combined
python cli.py arms run --product oneTBB --questions "$QUESTIONS" \
--arm "baseline,docs,skill:$SKILL,docs+skill:$SKILL" \
--context7-id "uxlfoundation/onetbb" \
--judge
# Or just baseline vs combined (to test synergy hypothesis)
python cli.py arms run --product oneTBB --questions "$QUESTIONS" \
--arm "baseline,docs+skill:$SKILL" \
--context7-id "uxlfoundation/onetbb" \
--judge
The combined treatment concatenates contexts from all sub-treatments. Use this to
test whether treatments provide synergistic benefit (positive interaction effect)
or interfere with each other (negative interaction effect). Calculate interaction
as: (docs+skill)_delta - docs_delta - skill_delta. Positive = synergy, negative
= interference, zero = independent effects.
More combined treatment examples:
# Docs + profile (expert persona with comprehensive reference)
python cli.py arms run --product oneTBB --questions "$QUESTIONS" \
--arm "baseline,docs+profile:data/agent_profiles/concise_expert.md" \
--context7-id "uxlfoundation/onetbb" \
--judge
# Triple combination (docs + profile + skill)
python cli.py arms run --product oneTBB --questions "$QUESTIONS" \
--arm "baseline,docs+profile:data/agent_profiles/concise_expert.md+skill:$SKILL" \
--context7-id "uxlfoundation/onetbb" \
--judge
# Test if multiple skills complement each other
OTHER_SKILL=<content-checkout>/skills/onetbb-flow-graph
python cli.py arms run --product oneTBB --questions "$QUESTIONS" \
--arm "baseline,skill:$SKILL,skill:$OTHER_SKILL,skill:$SKILL+skill:$OTHER_SKILL" \
--judge
Authoring fixtures¶
Agent profile (agent_profiles/<id>.md):
---
id: concise_expert
name: Concise Expert
description: Terse, code-first senior engineer.
---
You are a senior systems engineer. Lead with code, be terse, …
A persona states how to approach a problem; a skill states what is true about a library. Keeping them separate is what makes a comparison between them mean anything — a persona that lists APIs is documentation delivered through the system-prompt channel, and it is measuring the skill, not the persona. A persona measurement is therefore a ladder of profiles that holds the channel fixed and varies only what each one carries:
| Rung | Carries | Role |
|---|---|---|
| product persona | identity, convictions, reasoning order — no API names | the treatment under test |
| style-only variant | voice and stance, no product content | style floor: how much is tone alone |
| channel control | the skill's own text, verbatim | isolates the channel from the content |
| briefing | a product fact sheet | facts without a skill's structure |
| generic expert | expert framing with no product in it | negative control |
Only the two rungs that carry no product content are committed here —
concise_expert.md (style floor) and generic-expert.md (negative control). The product
persona, its style-only variant, the channel control and the briefing name a product, so
they are evaluation content: write them in your content repository and pass them as
profile:<path>.
tests/test_agent_profiles.py pins those roles for whatever profiles are committed. It
fails if a profile grows an API name — dotted names, keyword arguments, or a bare call — or
reuses five consecutive words of a committed skill, and if the negative control starts
naming a registered product. The denylist is API_SHAPES in that file, and companion tests
assert neither check is vacuous; it is a denylist, so it catches the shapes we have thought
of, not every possible leak. The same file also demonstrates paraphrase detection on
synthetic fixtures, so an external ladder can be checked the same way.
A channel control must stay byte-identical to the skill it mirrors — otherwise it varies content and channel and isolates nothing — so generate it rather than hand-editing it. Both paths are required, since skill and profile alike live wherever you keep them:
python scripts/sync_skilltext_profile.py \
--skill <content-checkout>/skills/onetbb-quickstart \
--profile <content-checkout>/agent_profiles/onetbb-skilltext.md \
--check # exit 1 if drifted, no write
python scripts/sync_skilltext_profile.py \
--skill <content-checkout>/skills/onetbb-quickstart \
--profile <content-checkout>/agent_profiles/onetbb-skilltext.md
# rewrite the body, keep the frontmatter
Re-syncing changes the prompt text and therefore profile_prompt_sha256, so cells already
scored on that arm measured the old text: re-run them rather than pooling.
Skill (skills/<name>/SKILL.md):
---
name: my-skill
description: One line that tells the agent when to use this skill.
---
# Instructions
…
Multi-file skills (progressive disclosure):
Skills can contain multiple .md files alongside SKILL.md, or nested in
subdirectories (references/, patterns/). When used with
skill-agent:<path>, the tool offers a file parameter listing all available
files by path relative to the skill root. The model can load SKILL.md first
(typically a navigation table) and then load specific topic files as needed.
Example structure, flat or nested:
skills/my-skill/
SKILL.md # Navigation/overview with topic-to-file mapping
getting-started.md # Topic-specific guidance
advanced.md # Deep-dive content
references/deep.md # Nested files work too, offered as references/deep.md
When the ViewSkillTool detects bundled .md files, it automatically offers
them by path relative to the skill root, so a file nested under references/
is offered as references/<name>.md:
{
"file": {
"type": "string",
"enum": ["SKILL.md", "advanced.md", "getting-started.md", "references/deep.md"],
"description": "Which file to load. Start with 'SKILL.md' to see the navigation..."
}
}
The SKILL.md should contain a navigation table mapping user contexts to files:
| Your context | Read this file |
|--------------|----------------|
| Installing and basic setup | `getting-started.md` |
| Advanced configuration | `advanced.md` |
| Deep dive on one topic | `references/deep.md` |
Note: When used with injected mode (skill:<path>), only SKILL.md is
loaded. Multi-file structure only activates in agentic mode (skill-agent:<path>).
For best results with injected mode, consolidate content into a single SKILL.md
file rather than relying on multi-file progressive disclosure.
Skill selection: does the agent load the right skill?¶
Answer-quality arms ask whether a skill helps once loaded. Selection is a separate question — whether the agent loads it at all, and loads it rather than a rival — and it needs its own query set: the questions a skill helps with are usually not the messages that make an agent reach for it.
Relation to skill routing. skill routing
asks the same question for one artifact: can its card win against named competitors?
The two differ in unit and in what the model sees:
skill routing |
skill-catalog: arm |
|
|---|---|---|
| Unit | one artifact vs --competitors |
a whole catalog; every skill is a target |
| Model sees | cards (name + description) in one pick prompt, order permuted per query | one view_skill_* tool per skill in the agent loop; it may load none |
| Negatives | none; an abstention is a miss | expected_skill: null, scored as false triggers |
| Reports | BM25 floor; model selection_rate, recall@1/@3, MRR |
accuracy, recall, misroute, false-trigger rate, confusion |
| Use it | while writing one skill's description, before content work | to compare models and find rival skills across a catalog |
Both are upper bounds on harness behaviour (see Real harness below). The positives of a trigger set are routing queries for their skill:
jq '[.questions[] | select(.expected_skill == "linux-perf") | .question]' trigger_questions.json > linux-perf.queries.json
Trigger set here means a selection query set: messages labelled with the skill that
should load. It is unrelated to the trigger axis of the
difficulty rubric, which tags
what input starts a task (counter, source, new_code). eval triggers generate does not
carry metadata.trigger into its output.
Build the set. eval triggers generate labels question files, lints them, and writes
the format a selection tool reads:
python cli.py eval triggers generate --catalog <skills-checkout>/skills \
--questions <content>/questions/intel_performance_skills_golden.json=@metadata.skill_under_test \
--questions <content>/questions/onetbb_golden.json=onetbb-quickstart \
--questions <content>/questions/onedal_golden.json=none \
--rewrite --model <model> --format reach --out trigger_set.json
PATH=LABEL: a skill name,none(no catalog skill should load — the negatives), or@field.pathread per question. A label that names no catalog skill fails the run; a question without the field is left unlabelled (label_unresolved), and a path that resolves for no question in its file fails the run as a typo. Unlabelled rows are dropped fromreachandskill-creator(stderr warns;--fail-on warnfails instead). A question with no usable text (text,question,promptorquestion_text) fails the run rather than becoming an empty query.--rewriteturns exam-style questions ("Scenario: … Describe how …") into the first-person request a developer would type. The rewriting model is given only the question text, never the catalog, so it cannot copy a description into the query.- Lint per query, summarised on stdout:
names_skill(the query tells the agent the answer),echo_terms(words only the expected skill's description uses),exam_framing, andlexical_rank(1 = word overlap alone picks the skill).--fail-on warnfails on named skills, exam framing or unresolved labels. --format reachwrites a google/skill-reachQuerySet. A label listing several skills keeps the first asexpected_skilland the rest asacceptable_skills, which skill-reach treats as neutral helpers rather than hits, so on those queries it is stricter than theskill-catalog:arm;skill-creator --target <skill>(a catalog skill) writes an anthropics/skills skill-creator eval set;eval triggers generate --format questionswritesquestions.v2withexpected_skillfor the arm below.
Proxy: the skill-catalog: arm. Runs in the normal arms loop on any model, and the
report gains a Skill selection table (accuracy, recall, recall (any), multi-load,
misroute, false-trigger rate):
python cli.py arms run --product <p> --questions trigger_questions.json \
--arm skill-catalog:<skills-checkout>/skills --model <model>
expected_skill labels are checked against the offered skills before any call. A cell
that fails is counted in the table's Failed column, not dropped; skills loaded together
in the first loading turn count as one choice. A first turn that loads several skills is a
hit only if all of them are acceptable; Recall (any) and Multi-load show the lenient
reading. When judged, the arm's reference is each skill the agent loaded (the
20,000-character budget split evenly among them) plus every catalog manifest. Skills that
were offered but not loaded are not shown.
It over-predicts: one tool per skill with the full description always visible, and no reason to explore first. Use it to compare models and to find rival skills that absorb each other's queries, not as the trigger rate users see.
Real harness: an external tool. Selection inside a coding agent depends on the harness — how it renders the catalog, and whether it truncates it — so it is measured by driving the harness itself, with a selection tool used as-is rather than vendored:
git clone https://github.com/google/skill-reach && cd skill-reach && uv sync
uv run reach eval --skills <skills-checkout>/skills --queries trigger_set.json \
--agent claude-code --model <model> -O skill_listing_budget_fraction=0.03 \
--attempts 3 --workdir /tmp/reach-run --out eval.json -y
uv run reach diff --vary description control.json treatment.json # A/B vs noise floor
Real harness, in dokimi: catalog trigger-probe. Runs each query in a fresh
claude -p: a new git repository with the catalog committed in .claude/skills/, a
scratch HOME and CLAUDE_CONFIG_DIR (your own skills, settings and CLAUDE.md are not
loaded; the model can still read any host path it has access to, the trigger set and its
labels included), the query sent verbatim with no notice or task framing, and bundled skills
left on as a user has them (--sealed turns them off). The skill chosen is read from the
transcript's Skill calls, and the output's skill_selection_summary is scored by the
same code as the skill-catalog: arm, one column per trial. max_turns_hit counts every run
that ended on --max-turns, whether or not it had called a Skill (one that had keeps that
call as its choice and is scored as a load), and max_turns_no_load counts only those without a
Skill call, which are scored as no load: the runs the cap may have affected. No run is repeated
with more turns, so neither count shows whether the cap changed a result. The command exits 1 when Claude Code
did not list a catalog skill (not_listed; status is then invalid: skill not listed, and the labelled results are still written). When no run listed any skill, not_listed
stays empty and a warning on stderr says it was not checked. A trigger set with no
labelled query exits 2 before any run. Before the labelled queries, one explicit run
(Use the <skill> skill., for the --target skill or the alphabetically first skill name of the
catalog) must load that skill; if it does not, no labelled query runs, status is
invalid: skill not loaded (Claude Code listed the skill but the request did not load it) or
invalid: skill not visible (the init event did not list it) in the output and on stdout, and the command
exits 1; a leftover <out>.partial is removed. A skill call that returned an error, or a
plugin:skill of another plugin, does not count as a load. If that run ended in an error, status is error: known-positive run failed instead. An empty catalog is
refused (exit 2) before the guard runs, unless --no-known-positive is passed. This
known-positive check is what separates "the model did not pick the skill" from "the
harness never showed it"; --no-known-positive skips it, and status is then unchecked (invalid: skill not listed still applies
when a catalog skill is never listed). A pass shows only that the skill can be loaded: the explicit request
may load a skill the harness did not list, so listing is diagnosed by invalid: skill not listed, not by the guard.
Records are kept in <out>.partial while the probe runs:
python cli.py catalog trigger-probe --catalog <skills-checkout>/skills \
--trigger-set trigger_set.json --model <model> --reps 3 --out probe.json
Two things decide whether such a number means anything:
- Listing budget. Claude Code shows skill descriptions only up to a budget (a
fraction of the model's context window); past it, skills appear as bare names. The
skill-catalog:arm recordscatalog_listing_charsso the size can be compared with the budget; pinskillListingBudgetFraction(above) or the run measures names, not descriptions. - Repeats. Selection varies run to run; use
--attempts 3or more and read the noise floorreach diffreports before calling a description change an improvement.
How to measure tool choice¶
The same rules hold for skills, MCP tools and plain function tools.
- Score the calls, not the judge. Which tool the agent called is in the
trace: the Skill selection table,
tool_preference.v1results, a transcript'stool_usage(the turn is infirst_call_iteration_by_name, and for skill tools inskill.first_call_iteration). A judge score mixes two things: whether the tool was picked and whether its content helped. A better answer can come from a tool the agent should not have needed. A call with arguments that do not fit the tool's schema is not run. It is kept with itserrorand counted intool_usage.call_errors, and the other counters leave it out. Report it on its own line: the agent picked the tool and could not use it. - Compare against an equal alternative. A choice tells you something only
when another offered tool would have done the job just as well. Otherwise it
measures whether the model can see that the task needs a tool.
tools preferencebuilds such pairs (twins) and controls that need no tool, and it swaps which twin is listed first. With both twins neutral, the first-listed one is still not chosen exactly half the time, so a comparison that never swaps the order mixes the position effect into the effect you are measuring. - Repeat; do not pin. Current reasoning models accept only
temperature=1(Pinning sampling), so the choice varies from run to run. Run 3 or more repeats (tools preference --reps 3,reach eval --attempts 3); for the other proxies, repeat the run. Readsame_choice_rate, or the noise floorreach diffreports, before you read an effect. A change smaller than the variation between repeats of one setting is not an effect. - Treat a proxy as an upper bound on effect size. A one-call proxy (the
skill-catalog:arm,tools preference,skill routing) shows every description in full and gives the model no reason to explore first. In one measured case the effect kept its direction on Claude Code but was about half as large (−0.42 on the proxy, −0.20 on the harness; Tool preference). Use the proxy to find and rank changes, then confirm the ones you ship on the real harness with a pinned listing budget.
Comparing cells across runs¶
One treatment measured over several models is many artifacts, one per cell. Two tools read them, and both refuse comparisons that would look fine and mean nothing.
report model-compare puts one row per run beside a shared baseline:
python cli.py report model-compare \
--regular-runs results/arms/haiku_regular.json results/arms/opus_regular.json \
--run-ids haiku,opus \
--out results/arms/compare.md
It names the arm it scored — the "Models Compared" table gains a Treatment arm column,
and the summary/ranking headers read profile:concise_expert instead of a generic
"Context arm" — because a profile: report and a docs: report are otherwise the same
document. It aborts, rather than warns, when the runs cannot be pooled:
- different
baseline_arm— the deltas are measured from different zeros; - different treatment arms — each run's delta would measure a different treatment. Pass
--treatment-arm <name>to pin one arm every run must be scored on (which is also required when a run holds more than one non-baseline arm); - one arm name carrying two prompt digests — the arm name comes from the profile's
frontmatter
id, so an edited profile leaves stale cells indistinguishable by name. Artifacts written before provenance stamping carry no digest and are left alone.
A differing question_set_hash is a warning. Two runs of the same configuration are an
error unless --pool-replicates averages them into one row.
scripts/check_treatment_batch.py gates a whole batch directory before you read any
number out of it:
python scripts/check_treatment_batch.py results/arms/persona-batch \
--profile data/agent_profiles/concise_expert.md
python scripts/check_treatment_batch.py results/arms/skills \
--treatment-arm 'skill:*' --expect-n regular=40,golden=20 --expect-files 12
A batch judged before the 2026-10-13 default change names its judge, since the pin is
anthropic/claude-sonnet-5-5:
python scripts/check_treatment_batch.py results/arms/persona-batch \
--profile data/agent_profiles/concise_expert.md \
--judge-provider amazon-bedrock --judge-model global.anthropic.claude-sonnet-4-6
It checks schema, exactly two arms, the baseline arm, the treatment-arm pattern, a pinned
--judge-model/--judge-provider, that the judge is not the answering model
(self-judging), question and per-arm answer counts, and — for profile: arms — that the
system prompt reached every treatment answer and no baseline answer. With --profile it
compares each cell's stamped digest against the file's current text and reports
STALE ARTIFACT, which is what catches a cell a runner would otherwise skip as done.
--expect-n maps a filename suffix to a question count, and the defaults (regular=40,
golden=20) are one product's sizes only — observed golden sets run 20, 24 or 111 questions
depending on the product, so a batch over another product must pass its own. Two things keep that from
turning into a green row of wrong counts: a filename matching none of the suffixes is
reported rather than silently gated against the artifact's own total_questions (the runner
writes that field as len(records), so every count check would hold by construction), and a
--expect-n value that disagrees with total_questions is flagged as a mis-specified map
rather than a short run.
Two gates are deliberately statistical rather than absolute:
- coverage, not zero errors. A judge call fails occasionally (~1.25% observed against
the Intel proxy), and a failed call leaves
aggregate: null. The gate requires ≥95% of questions scored in both arms. - paired deltas. The artifact's
delta_vs_baselineis paired over the questions both arms scored, so one failed call does not subtract means taken over different questions (39 vs 40 was observed, worth ~0.4 points). The script recomputes it over those questions. It pools questions; a mean of per-cell means differs slightly when the sets have different sizes — say which one a report uses.
Headroom: items a comparison cannot learn from¶
A skill cannot raise an item the no-skill arm already answers, and an item no arm
answers points at the question or its grader, not at the skill. eval headroom flags
both, from one or more arms files of the same question set (one file per repetition):
python cli.py eval headroom run1/arms.json run2/arms.json run3/arms.json \
--baseline-arm baseline --ceiling 0.9 --floor 0 --min-reps 3 --out headroom.json
- ceiling: the no-skill arm's mean over the runs is at least
--ceiling(0-1; the 0-100 aggregate divided by 100). Default 0.9. - floor: the no-skill arm was scored, every arm that a run scored has a mean at most
--floor, and at least one arm other than the no-skill arm scored. Default 0. An arm no run scored is left out of this test and listed in the item'sunscored_arms; the no-skill arm alone at zero is not a floor. - provisional: fewer than
--min-repsruns scored the item with its no-skill arm (the reps are those runs, less the cached repeats described below). Default 3. A file gives each item zero or one rep (zero when its no-skill arm was not scored in that file), so one file alone makes every item provisional at the default of 3; the reps of several files add up (a file whose no-skill answer is a cached copy of another file's scored one adds none, see below).
A run is one file. A file repeated on the command line, or holding the same JSON content as
an earlier one (whitespace and key order do not count), is skipped with a note, so it does
not add a rep. Numbers are compared as numbers: 95.0 and 95 are the same content. A question id repeated within one
file is an error (exit 2): it would count as two runs.
A cached replay is not a fresh rep. With DOKIMI_RESPONSE_CACHE set, a repeated arms run replays
the same answers and judgments, and the file marks each answer the cache served with replayed: true.
A replayed answer whose text a scored fresh answer of another input file has for the same item and arm
is left out of the reps and the means. Replays of one text that no scored fresh answer has count as one
rep at the mean of their scores, whatever the order of the files. The summary's replayed_repeats counts the scores of
replays that added no rep (a replay with no score is not one), and a note under the table gives it. Files written before the flag carry none: collect their repeats with the cache off.
The table always goes to stdout: the flagged and provisional items, with the no-skill arm
in its own column, a note naming any arm no run scored, and the counts. The JSON goes to
--out only, as a headroom.v1 artifact with every item; if that file cannot be written the
command prints Error: cannot write ... on stderr and exits 2, after the table. Scores are compared unrounded
and shown rounded down to up to nine decimal places, so 0.89996 prints as 0.89996 and a value just under a threshold never
prints as the threshold. Without --baseline-arm, the runs must
declare the same baseline; the default is that baseline. The runs must also be repetitions of one
configuration: a file whose model, judge, run config (the seed aside), harness, arms or library
differs from the first file's exits 2. So does a file scored by eval score reference next to a judged one, an arm whose
recorded profile prompt digest differs between files (an edited profile keeps its name), and a question
id judged grounded in one file and ungrounded in another (a file with no grounded_questions count is not
compared). With --baseline-arm, the arm must
be one the runs list (exit 2 otherwise, naming the arms that exist), and the declared
baselines are not checked. A threshold out of range exits 2: --ceiling in [1e-6, 1],
--floor 0 or in [1e-6, ceiling), --min-reps at least 1. A positive threshold may be finer than one score step. It also exits 2 when no run scored the
no-skill arm, or when --out is one of the input files (or its .rejected sibling), or names a directory or a path ending in a separator. Scores are read as the 0-100
aggregate divided by 100 and are not range-checked. Only arms runs are read. The flags are descriptive: they do not
change any score or any gate.
Skill coverage: which checks name each requirement¶
eval skill-coverage lists the checkable requirements a SKILL.md states (triggers, out of
scope, must hold, success criteria, failure modes) and names, for each one, the eval checks
that would fail if a run violated it. Requirements no check names are printed as candidate
checks to write. The eval set is either an evals.json, a skill directory, or a tasks root;
a check is an evals row (by id), a test_* function in a test file under a task's tests/ (any
subfolder), or a test_* method of a Test* class (named Class::method). A task check's text is the
module-level code of the whole tests/ folder (constants, helpers, imports, and conftest.py), then the
class header (decorators, bases, keywords) and the rest of the class body for a method, then the test itself. So two tests with the same body but different constants,
helpers or fixtures are two checks. They are named test_x#1, test_x#2, in path order. That context is in every check of the folder, read or not, so a
helper one file defines can decide an assertion in another. A tests/ folder with a directory that cannot be listed is an input error (exit 2): neither the checks nor the --out guard read a smaller folder.
python cli.py eval skill-coverage skills/demo/SKILL.md evals/evals.json \
--model anthropic/claude-sonnet-5-5 --max-usd 2 --out skill_coverage.json
- Two model calls: one lists the requirements, one maps them to the checks. Both go through
the novelty client.
--max-usdis checked before each call: once spend has reached the cap, the next call is refused and the run exits 1 with nothing written. The call that crosses the cap is already paid, so spend can exceed the cap by that one call. A call whose price is unknown also stops the run (exit 1). - The map is LLM-estimated. On a prototype's labelled calibration set of 88 items (not shipped), item precision was about .92 and recall 1.0, and link precision about .70, with the model and the check text of that time. Neither figure was re-measured on the current check text, and the report does not carry them: its label says only that the map is LLM-estimated. Nothing reads the output as a score or a gate, and the command exits 0 whenever the map was made.
- The checks go to the mapping call in one prompt, capped at 120,000 characters. The cap is checked
before the first paid call: an eval set over it exits 2 with a message to map a smaller set. The
folder's module code is repeated in each of its checks, so a large
tests/folder with many tests reaches the cap sooner. - A check name the model invents is dropped and counted (
check_names_dropped); requirements past 80 are cut and counted (requirements_dropped). A listed row that is not a requirement (not an object, an unknown section, or no text) is counted separately (requirements_unusable), not as a cut. - This is not
eval coverage. That command checks theneedslabels of a need graph against the eval set's structure. This one maps requirements of the skill's text to checks, so the two can disagree; neither reads the other's output. --outwrites askill_coverage.v1artifact (dokimi runs showreads it). A bad reply from the model, or a SKILL.md or evals set that cannot be read, exits 1 or 2 respectively. An--outthat would overwrite an input or cannot be written, and an empty eval set, exit 2 before any paid call.
Leak gate and split lock: is the candidate skill carrying the answers?¶
A skill tuned against the items it is scored on measures nothing. eval leak checks a
candidate skill (a directory, or its SKILL.md) against a questions set, and checks the
dev/val/test split against the one locked at first use:
python cli.py eval leak skills/candidate questions.json --split split.json \
--allow-file allow.txt --proposer proposer_ids.json --out leak.json
- leak: an item is flagged when at least
--min-fraction(default 0.10) of the 8-word runs of its expected answers and checks also occur in the skill's text, or when any single verbatim run of--verbatim-wordswords (default 12) of that text occurs in the skill, whatever the share (a copied passage can be a small share of a long answer). The expected text of an item is the literal values of its positive checks and thereferenceof its judge checks. A judge check with noreferencecounts itscriterioninstead, at the same weight as a reference (there is no lower weight for a criterion), and only where there is no reference. Negated checks are left out. The skill's text is every UTF-8 file beside SKILL.md, each cut separately so a run does not span two files. A directory of the skill that cannot be listed is an input error (exit 2), not a smaller skill. An entry namedevalsdirectly under the skill (the skill's ownevals/directory) is not indexed, as the agent's plugin copy leaves it out too, so questions imported from itsevals/evals.jsonare not flagged against themselves. Questions are not compared: restating one is fine. - threshold: 0.10 was set on eight saved unitrace GEPA candidates and their eval items. The benign candidates peaked at 0.073 of their runs in common with an item (the boilerplate: headers, flag names), and the candidates that copied an answer sentence reached 0.136 and up. A fraction in between is a judgement call; read the table, not only the status.
- allowlist:
--allow TERM(repeatable) and--allow-file FILE(one term per line,#comments) name terms that legitimately appear in both, such as API names, paths and identifiers. Build the list from the question prompts and the skill, never from the expected answers, or the gate stops checking what it exists to check. Whole-word runs of a term are removed from both texts before the runs are cut, so a copied sentence that holds a term is still caught. Single-letter flag terms (-d,-v) are plain words once cut and drop out of every text: list only the longer forms. A bare command made only of allowlisted identifiers is not detected; that is a known limitation. The verbatim rule needs the same allowlist: a shared command line of 12 or more words (a build or install command, for example) is one verbatim run, so without the allowlist a benign skill can be flagged by it. - split lock:
--splitis a JSON object{"dev": [ids], "val": [ids], "test": [ids]}that places every question once. The lock (--lock, default: the split's name with.lock.json) is written at first use with each question's split and the SHA-256 of itsgradingblock, so a changed expected answer or check counts as a change, not only a moved id. A later run whose digest differs is blocked and names the items whose split or grading block moved; the lock is never rewritten by such a run. A lock edited by hand, without recomputing its digest, is refused. The lock is an accidental-edit check, not tamper-proof: its digest sits beside the assignment it covers, so whoever can write the lock can also write a matching digest. - relock:
--relock(with--split) overwrites the lock with the current split and grading blocks, after a deliberate change. It is written only when the run passes (no leak, no test item given to the proposer, nothing unchecked). A blocked or inconclusive run leaves the old lock as it was and reportssplit not relocked. A passing run reportssplit relocked, prints the digest it replaced (previous_digestin the artifact) and lists the items that moved. It is not a split violation. A corrupt lock is replaced, with no previous digest. - warnings: a skill file that is not UTF-8 text (a UTF-16 notes file, a binary asset) or is
a symbolic link is not read, and so is not checked. The report and the artifact's
warningslist name each one. A warning does not block the run; a skill that ships binary assets gets one warning per file. - proposer:
--proposer FILEis a JSON list of the question ids the proposer sees. A test id on it blocks the run.
The table goes to stdout. The leak.v1 artifact goes to --out only. Exit 0 is a pass, 1 is
blocked (a leak, a changed split, a test item given to the proposer), 3 is inconclusive (an item
could not be checked, such as an answer shorter than 8 words after the allowlist, or no item
could), and 2 is an input error (an unreadable skill or question set, a malformed split, lock
or proposer list, or an unwritable --out). --lock needs --split; a proposer list needs
a split. No model is called.
Scope and caveats¶
- Three levels of fidelity for skills/MCP. (1)
skill:/mcp:inject content directly — cheapest, but a model can't choose not to use it. (2)skill-agent:/agent:let the model decide via the tool-calling loop — faithful to how skills/MCP are consumed, but still read-only and in-process. (3) Running a skill's bundled scripts needs real sandboxing and belongs on the executable terminal-bench track — the in-process loop deliberately exposes only read-only tools. - Single-answer judging under-measures skills and persona prompts, whose value is often procedural. Treat the deltas as a proxy; use the task track for behavioral signal.
- Fair comparisons hold the answer model, question set, and judge fixed across arms — only the treatment varies, and the judge's reference material varies with it (see above).
- Combined treatments concatenate contexts in the order the arm spec lists them,
not in a fixed order by kind.
profile:arms contribute a system prompt rather than injected context, so they never appear in that concatenation. Combining is consistent but may increase prompt token usage significantly — test on a small question set first to estimate cost impact before running full evaluations. - A combined arm sends only one system prompt. If two
profile:arms are combined, the first one wins, the rest are dropped with a warning and listed in the arm'sdropped_system_promptsmetadata. Compare personas as separate arms, not combined. - Interaction effects may not be additive.
(docs+skill)_deltamay differ fromdocs_delta + skill_deltadue to context interference, redundancy, or synergy. Always measure the combined treatment directly rather than assuming linear effects.