@uinaf/skillcheck 1.7.6 → 1.7.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/docs/scenarios.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # Writing scenarios
2
2
 
3
- A scenario is two files in a frozen location:
3
+ A scenario is two files in a fixed location; a directory missing either is not
4
+ discovered:
4
5
 
5
6
  ```text
6
7
  <root>/skills/<skill>/evals/<scenario>/task.md
@@ -9,15 +10,12 @@ A scenario is two files in a frozen location:
9
10
 
10
11
  The path is the identity: `<skill>--<scenario>` names the run, the result file,
11
12
  and the scorecard entry. Codex and Grok results gain `--codex` and `--grok`
12
- suffixes, so harnesses can hold results side by side. Double hyphens and
13
- leading or trailing hyphens in a skill or scenario name are escaped in the run
14
- and result filename; the scorecard keeps the original name.
15
- A directory missing either file is not discovered.
13
+ suffixes.
16
14
 
17
15
  ## task.md
18
16
 
19
- The prompt handed to the agent, verbatim, with one piece of syntax. Input files
20
- are embedded inline and materialized into the workdir before the run:
17
+ The prompt handed to the agent, verbatim. Input files are embedded inline and
18
+ written into the workdir before the run:
21
19
 
22
20
  ```md
23
21
  Fix the failing check in the config below.
@@ -27,15 +25,19 @@ Fix the failing check in the config below.
27
25
  ======= END FILE =======
28
26
  ```
29
27
 
30
- Each block is replaced in the prompt with a pointer ("Input file `config.json`
31
- is available in your working directory.") and written to disk. Destinations
32
- must stay under the workdir, must not collide, and must not target `.claude/`,
33
- `.agents/`, `.grok/`, or `node_modules/`, since a fixture must not configure its
34
- own examiner or embed generated dependencies.
28
+ The prompt then says "Input file `config.json` is available in your working
29
+ directory." Destinations must stay under the workdir, must not collide, and
30
+ must not target `.claude/`, `.agents/`, `.grok/`, or `node_modules/`.
35
31
 
36
- Write the task the way a user would write it. Do not name the skill, describe
37
- its steps, or hint at the checklist: routing is part of what is being measured.
38
- `skillcheck lint` rejects a task whose prose names any skill in the root.
32
+ Write the task the way a user would, without the skill's name, its steps, or
33
+ the checklist: routing is part of what is measured.
34
+ `skillcheck lint` rejects a task that names any skill in the root.
35
+
36
+ The agent runs online with a shell and web access. On a host run it has the
37
+ operator's logins, so a task must never ask for a live mutation such as
38
+ posting a comment, pushing, publishing, or writing to a shared workspace. Put
39
+ that state in fixture files and grade the plan. Checks the agent can run
40
+ itself (install, build, test, fetch a public page) are fair to require.
39
41
 
40
42
  ## criteria.json
41
43
 
@@ -49,109 +51,74 @@ its steps, or hint at the checklist: routing is part of what is being measured.
49
51
  }
50
52
  ```
51
53
 
52
- `type` must be `weighted_checklist` and the checklist must be non-empty. Every
53
- item needs a non-empty `name` and `description` and a positive `max_score`.
54
- Weights are relative; no total is required. `skillcheck lint` applies these
55
- checks and the `skill_use` and `install` rules below to every `criteria.json`.
56
-
57
- Each item becomes one `llm-rubric` assertion weighted by `max_score`, inside an
58
- assert-set with threshold 0.7. A separate `skill-used` assertion sits outside
59
- that aggregate, so a run that produces good output without ever loading the
60
- skill still fails. The skill counts as loaded when the harness reports a skill
61
- call for it, or when the agent completed a read of the installed
62
- `<config-root>/skills/<skill>/SKILL.md` in its workdir, or a successful shell
63
- command whose output carries the installed file's opening text.
64
- Claude Code often reads the file directly instead of calling its Skill tool,
65
- sometimes from a shell, and either way the same instructions reach its context.
66
-
67
- An out-of-lane scenario, where the right answer is to decline the skill, sets
68
- `"skill_use": "optional"` in `criteria.json`. The assertion then always passes,
69
- and the result still records whether the skill was loaded. Omitted, it is
70
- `"required"`. There is no test-level threshold: both must pass. The
71
- reported score is the assert-set's weighted score; skill-used is reported
72
- separately as a rate across trials.
54
+ `type` must be `weighted_checklist` and the checklist non-empty. Every item
55
+ needs a non-empty `name` and `description` and a positive `max_score`. Weights
56
+ are relative. `skillcheck lint` applies these checks and the `skill_use` and
57
+ `install` rules below.
58
+
59
+ Each item becomes one `llm-rubric` assertion weighted by `max_score`, in an
60
+ assert-set with threshold 0.7. A separate `skill-used` assertion must also
61
+ pass, so good output without loading the skill still fails.
62
+
63
+ Write descriptions a judge can check against the deliverable: an observable
64
+ property. Weight the items that would make a reviewer reject the
65
+ work. Name a specific tool or version only when the skill teaches it;
66
+ otherwise grade the property the tool provides.
67
+
68
+ ### skill_use
69
+
70
+ | Value | Use |
71
+ | ---------------------- | ------------------------------------------------------------------------------------ |
72
+ | `"required"` (default) | The skill must load |
73
+ | `"optional"` | Out-of-lane scenario; loading is recorded, never failed |
74
+ | `"forbidden"` | Near miss: fails when this skill loads. Not on Grok, whose load evidence is too thin |
73
75
 
74
76
  ## Trigger scenarios
75
77
 
76
- A trigger scenario measures routing: whether a natural prompt loads this skill
77
- when adjacent skills compete for it. `"install"` names other skills under the
78
- same root to install beside it, or `"all"` installs every model-invocable one,
79
- as a plugin does. Alternatives must be real directories, not symlinks. A hidden
80
- skill is never an alternative and cannot be the skill under test: production
81
- loads it only on an explicit invocation, so there is no routing to measure.
78
+ A trigger scenario measures whether a natural prompt loads this skill when
79
+ adjacent skills compete for it. `"install"` names other skills under the same
80
+ root to install beside it, or `"all"` installs every model-invocable one.
81
+ Alternatives must be real directories, not symlinks. A hidden skill is never an
82
+ alternative and cannot be the skill under test.
82
83
 
83
- - Positive: `"skill_use": "required"` (the default) with the alternatives
84
- installed. It fails when the agent routes elsewhere or loads nothing.
85
- - Near miss: `"skill_use": "forbidden"` on a prompt that belongs to a
86
- neighbor or to no skill. It fails when this skill loads, and the skill-used
87
- rate then counts the misfires. Not on Grok, whose load evidence is too thin
88
- to tell an unloaded skill from an unseen read.
84
+ - Positive: `"required"` with the alternatives installed. It fails when the
85
+ agent routes elsewhere or loads nothing.
86
+ - Near miss: `"forbidden"` on a prompt that belongs to a neighbor or to no
87
+ skill. The skill-used rate counts the misfires.
89
88
 
90
89
  Keep the checklist on the outcome the right lane should produce, so a near
91
90
  miss that loads nothing but does the work badly still fails. A control run of
92
91
  either installs nothing and requires nothing.
93
92
 
94
- Write descriptions a judge can check against the deliverable: an observable
95
- property, not a feeling. Weight the items that would make a reviewer reject the
96
- work.
97
-
98
- The agent runs online, like a real session: it has a shell and web access on
99
- every harness (Claude: Bash, WebFetch, WebSearch; Codex: network and web search
100
- in its `workspace-write` sandbox; Grok: its CLI defaults). It runs on the
101
- operator's machine with the operator's logins (Codex gets a per-run
102
- `CODEX_HOME` carrying only its config and login, so the operator's own skills
103
- and global guidance stay out), so a task must never ask for a
104
- live mutation such as posting a comment, pushing, publishing, or writing to a
105
- shared workspace. Put that state in fixture files and grade the plan. Checks
106
- the agent can run for itself (install, build, test, fetch a public page) are
107
- fair to require.
108
-
109
- Name a specific tool or version only when the skill teaches it. Otherwise grade
110
- the property the tool provides, so an equivalent approach passes.
111
-
112
93
  ## What the judge sees
113
94
 
114
- The agent's final message, plus every file in the workdir that differs from the
115
- pre-run manifest. Unchanged inputs are omitted; deleted inputs, unreadable
116
- files, and non-regular files are named rather than read.
95
+ The agent's final message, plus every workdir file that differs from the
96
+ pre-run manifest. Deleted inputs, unreadable files, and non-regular files are
97
+ named rather than read. Agent config roots, `node_modules`, and tool caches are
98
+ skipped.
117
99
 
118
- Sections are sorted by path, each file is capped at 16,000 characters and the
119
- appended total at 64,000, with truncation stated inline. Very large outputs make
120
- rubric judges return nothing at all, which is why the caps exist. Keep fixtures
121
- small enough that the deliverable fits.
100
+ Each file is capped at 16,000 characters and the total at 64,000. Keep
101
+ fixtures small enough that the deliverable fits.
122
102
 
123
103
  ## Hidden skills
124
104
 
125
- A skill with `disable-model-invocation: true` is explicit-invoke-only in
126
- production, which the agent SDK cannot simulate. So the eval copy, never the shipped one,
127
- has the flag stripped, and the task gains a leading
128
- `Use the <skill> skill for this task.` The eval then measures
129
- behavior-when-invoked rather than routing. The flag is only honored inside the
130
- frontmatter block; body text mentioning the key does not count.
105
+ A skill with `disable-model-invocation: true` is invoke-only. The eval copy has
106
+ the flag stripped, and the task gains a leading
107
+ `Use the <skill> skill for this task.` The eval then measures behavior when
108
+ invoked.
131
109
 
132
110
  ## The workdir
133
111
 
134
- Per run, under a scratch directory in the system temp dir
135
- (`skillcheck-<uid>-<hash of the root>/<name>/trial-<n>/`), rebuilt from scratch each
136
- time. It stays outside the root so the agent cannot reach the skill's source,
137
- its evals, or the repository's own agent guidance. The skill under test is installed where the harness discovers skills:
138
- `.claude/skills/<skill>/`, plus `.agents/skills/<skill>/` on codex, or
139
- `.grok/skills/<skill>/` on Grok, with its `evals/` directory excluded, so
140
- criteria never leak into the agent's context. Symbolic links inside an installed
141
- skill are rejected: a copied link could expose excluded evals or let the agent
142
- change the source tree. Sibling skills under the same root that the skill links to (inline, angle-bracket, or reference links, followed transitively; a symlink out of the root is skipped) are installed beside it
143
- the same way, so links such as `../other/SKILL.md` resolve as they do when a
144
- plugin installs the set; a control run installs none of them.
145
-
146
- A Codex run gets a private `CODEX_HOME` holding only the operator's
147
- `config.toml` and `auth.json`, with plugins turned off (`features.plugins =
148
- false`) so a plugin the config enables cannot supply skills, and a private `HOME` that links every entry of
149
- the operator's home except `.agents`, `.claude`, and `.codex`. Auth helpers that read
150
- `$HOME` keep working; the operator's user-level skills and global guidance are
151
- not visible.
152
-
153
- Graded output skips agent config roots, `node_modules`, and tool caches
154
- (`.cache`, `.npm`, `.pnpm-store`), so a cache cannot crowd deliverables out.
155
-
156
- Scenario quality is behavioral proof; [authoring](authoring.md) covers the
157
- judgment layer lint and evals cannot grade.
112
+ Each trial runs in a fresh directory under the system temp dir, outside the
113
+ root, so the agent cannot reach the skill's source, its evals, or the
114
+ repository's agent guidance.
115
+
116
+ - The skill is installed where the harness discovers skills
117
+ (`.claude/skills/`, plus `.agents/skills/` on Codex, or `.grok/skills/` on
118
+ Grok), without its `evals/` directory.
119
+ - A symbolic link inside an installed skill is rejected.
120
+ - Sibling skills the skill links to, followed transitively, are installed
121
+ beside it, so links such as `../other/SKILL.md` resolve. A control run
122
+ installs none of them.
123
+ - A Codex run gets a private `CODEX_HOME` and `HOME` that hide the operator's
124
+ user-level skills, plugins, and global guidance.
package/docs/usage.md CHANGED
@@ -1,8 +1,7 @@
1
1
  # Usage
2
2
 
3
3
  Every subcommand resolves one root, `--root <dir>` or the current directory.
4
- `lint` also takes the root as a positional, because that is the shape CI reaches
5
- for first.
4
+ `lint` also takes the root as a positional.
6
5
 
7
6
  ## Lint
8
7
 
@@ -17,22 +16,16 @@ Checks each `<root>/skills/<skill>/`:
17
16
  - Keys are `name`, `description`, `disable-model-invocation` and nothing else,
18
17
  each at most once
19
18
  - `name` equals the directory name; `description` is non-empty
20
- - `disable-model-invocation`, when present, is the bare YAML boolean `true`.
21
- A quoted `"true"` is an error
22
- - Relative links in the body resolve on disk
23
- - No eval `task.md` names a skill from the root, outside its inline input
24
- files. A named skill gives routing away, and a no-skill control can read
25
- the operator's installed copy
26
- - Every eval `criteria.json` is valid JSON and meets the
27
- [criteria contract](scenarios.md#criteriajson) `run` enforces before it
28
- starts, so a broken file fails CI instead of stopping a sweep midway
29
-
30
- Code spans and fenced blocks are stripped before links are checked, so example
31
- links never fail. External schemes and `#anchors` pass. Dot-directories under
32
- `skills/` (`.claude-plugin`) are plugin metadata, not packages, and are skipped.
33
-
34
- Findings print one per line, relative to the linted root, then a count. Exit 0
35
- clean, 1 with findings.
19
+ - `disable-model-invocation`, when present, is the bare YAML boolean `true`
20
+ - Relative links in the body resolve on disk; links in code spans and fenced
21
+ blocks are skipped
22
+ - No eval `task.md` names a skill from the root outside its inline input files
23
+ - Every eval `criteria.json` meets the
24
+ [criteria contract](scenarios.md#criteriajson)
25
+
26
+ Dot-directories under `skills/` (`.claude-plugin`) are skipped. Findings print
27
+ one per line, relative to the root, then a count. Exit 0 clean, 1 with
28
+ findings.
36
29
 
37
30
  ## Run
38
31
 
@@ -44,33 +37,23 @@ skillcheck run <scenario-dir> --harness grok
44
37
  skillcheck run <scenario-dir> --trials 3 --agent-effort medium
45
38
  ```
46
39
 
47
- Materializes the scenario into a temp-dir workdir per trial ([workdir](scenarios.md#the-workdir)),
48
- installs the skill under test into that workdir, drives the agent, and grades
49
- the files it wrote. Exit 0 means pass, 1 means graded fail, and 2 means error.
50
- Exit 2 covers missing usable promptfoo output or optional eval peers. The
51
- message carries the exact `pnpm add` command; see
52
- [adoption](adoption.md#evals).
53
-
54
- A test that errored was never graded, so it exits 2, prints the provider's
55
- message, and writes no provenance sidecar. It is never reported as
56
- `FAIL score=0.0000`; only a real judged verdict can fail a run.
40
+ Materializes the scenario into a temp workdir per trial
41
+ ([workdir](scenarios.md#the-workdir)), installs the skill, drives the agent,
42
+ and grades the files it wrote. Exit 0 means pass, 1 graded fail, 2 error. A
43
+ missing eval peer exits 2 with the exact `pnpm add` command. An errored test
44
+ is ungraded: it exits 2 and prints the provider's message.
57
45
 
58
- Defaults: `--harness claude`, agent `claude-opus-5`, judge `claude-opus-5`,
59
- and a Claude agent limit of 50 turns. `--max-turns` changes that limit only for
60
- Claude; passing it with `codex` or `grok` fails before the eval starts. On
61
- those harnesses, omitting `--agent` leaves the model to that CLI's own default.
46
+ - `--harness` defaults to `claude`. On `codex` and `grok`, omitting `--agent`
47
+ uses that CLI's default model.
48
+ - `--max-turns` and `--agent-effort low|medium|high|xhigh|max` work only with
49
+ `--harness claude`; other harnesses fail before the eval starts.
50
+ - `--harness grok` runs the locally installed, logged-in Grok Build CLI.
62
51
 
63
52
  ### Isolated runs
64
53
 
65
- Run evals inside the image in [container/](../container/Dockerfile), which
66
- follows promptfoo's guidance for
67
- [coding agents](https://www.promptfoo.dev/docs/guides/evaluate-coding-agents/):
68
- a workspace is not a sandbox, so agents run in an ephemeral container with a
69
- read-only mount of the repository, writes on a separate volume, a
70
- project-local Codex home, and only the credentials they need. On the host the
71
- agent shares the operator's machine: it can read installed skills, enabled
72
- plugins, global guidance, and any file by absolute path. `run` and `sweep` warn
73
- when they are not isolated.
54
+ Run evals inside the image in [container/](../container/Dockerfile). On the
55
+ host the agent can read the operator's installed skills, plugins, global
56
+ guidance, and any file by absolute path, so `run` and `sweep` warn.
74
57
 
75
58
  ```sh
76
59
  docker build -t skillcheck:<version> --build-arg SKILLCHECK_VERSION=<version> container
@@ -80,35 +63,20 @@ docker run --rm --env-file <owner-only env file> \
80
63
  skillcheck:<version> run --root /srv/work skills/<skill>/evals/<scenario> --trials 3
81
64
  ```
82
65
 
83
- skillcheck runs as root and reads the repository from `/srv`, which only root
84
- can enter. Each agent binary starts through a wrapper that drops to the
85
- unprivileged `agent` user, which owns only its workdir and the run's homes; the
86
- run's promptfoo config and manifests, which carry the criteria, and promptfoo's
87
- own state stay root-only. Start one container per `run` or `sweep`
88
- invocation, as above: agents in one container share the agent user, so a
89
- control must never share a container with a skill run. The image's home is
90
- empty. Pass Claude gateway auth
91
- through the env file ([auth](#auth)) and mount a Codex `config.toml` written for
92
- the run that names only the model provider and its auth, never the operator's
93
- own; a token its auth command reads must be readable by the agent user. Codex's
94
- namespace sandbox cannot start inside a container, so skillcheck runs it with
95
- full access there; the container and the user drop are the boundary. A run
96
- counts as isolated only inside a container, with the image's marker variable,
97
- skillcheck running as root, an agent user configured, and the wrapper
98
- installed; results record `isolated` in their run
99
- configuration, so `summarize` refuses to mix isolated and host rows and `sweep`
100
- reruns host results.
66
+ - Start one container per `run` or `sweep`. Agents in one container share a
67
+ user, so a control must never share a container with a skill run.
68
+ - Pass Claude gateway auth through the env file ([auth](#auth)).
69
+ - Mount a Codex `config.toml` written for the run that names only the model
70
+ provider and its auth, never the operator's own. The `agent` user must be
71
+ able to read any token its auth command reads.
72
+ - Results record `isolated`. `summarize` refuses to mix isolated and host
73
+ rows, and `sweep` reruns host results.
101
74
 
102
75
  ### Trials
103
76
 
104
- One trial is one sample of a noisy process: the same scenario and skill can
105
- score 0.49 and then 0.99. `--trials <k>` (default 1) runs the agent k times,
106
- each in its own workdir with its own manifest, all graded in one promptfoo eval.
107
- promptfoo's `--repeat` is not used because it reuses one set of vars and one
108
- `working_dir`, so concurrent trials would write into the same tree and each
109
- would be graded on all of their deliverables.
110
-
111
- A scenario's result aggregates its trials:
77
+ `--trials <k>` (default 1) runs the agent k times, each in its own workdir, all
78
+ graded in one promptfoo eval. Use 3 or more before calling a skill change
79
+ better or worse. A scenario's result aggregates its trials:
112
80
 
113
81
  | Field | Meaning |
114
82
  | ------------------------------- | ------------------------------------------------------------------------------------------------- |
@@ -120,73 +88,33 @@ A scenario's result aggregates its trials:
120
88
  | `skill_used`, `skill_used_rate` | Trials that loaded the skill, as a count and fraction; on a near-miss scenario these are misfires |
121
89
  | `noisy` | Trials both passed and failed, or `score_spread` is at least 0.2 |
122
90
 
123
- A trial that errored was never graded, so one errored trial makes the whole
124
- scenario an ERROR: pass^k over fewer than k trials is not the requested number.
125
- So is a result with fewer rows than trials, or a row without its checklist and
126
- `skill-used` components.
127
- With `--trials` above 1, `run` and `sweep` print min, spread, pass count,
128
- skill-used count, and `NOISY`.
91
+ One errored trial, a result with fewer rows than trials, or a row without its
92
+ checklist and `skill-used` components makes the whole scenario an ERROR.
129
93
 
130
94
  ### Control
131
95
 
132
- `--control` runs a scenario without the skill: nothing is installed in the
133
- workdir, a hidden skill's explicit invocation is dropped from the task, and the
134
- `skill-used` assertion never fails. Its result sits beside the skill run
135
- (`<name>--control.json`) with `variant: "control"` in the sidecar, and `sweep
136
- --control` covers every scenario. `summarize` pairs each scenario with its
137
- control and adds two columns per skill: the mean control score, and the lift
138
- (skill score minus control score over the paired scenarios). A scenario whose
139
- control passes every trial prints as `NO LIFT`: it passes without the skill, so
140
- it does not test the skill.
141
-
142
- ### Agent effort
143
-
144
- `--agent-effort low|medium|high|xhigh|max` sets the Claude agent's effort.
145
- promptfoo passes it to the Agent SDK, which starts Claude Code with `--effort`.
146
- Omitting it leaves Claude Code's default. Only `--harness claude` takes it;
147
- `codex` and `grok` fail before the eval starts. It is separate from
148
- `--judge-effort`.
149
-
150
- ### Harnesses and judges
151
-
152
- `--harness grok` runs the locally installed Grok Build CLI in the disposable
153
- workdir with the skill under `.grok/skills/`. It uses native streaming events
154
- to count a completed read of that skill's `SKILL.md` as `skill-used` evidence.
155
- Grok must be logged in locally or have its supported credentials configured.
156
- The run disables subagents and grants edit permission in the workdir; web
157
- search stays on. `--agent` selects a Grok model ID. Malformed fields consumed by
158
- the provider are reported as run errors. Progress-only tool updates and pending read inputs are
159
- ignored. Skill-read evidence requires a file path on the initial tool call
160
- (`path` or `target_file`) and a completed update.
161
-
162
- `--judge` takes either a bare Claude model (graded through the Anthropic
163
- selection in [auth](#auth)) or a provider-qualified promptfoo id, passed
164
- through verbatim:
96
+ `--control` runs a scenario without the skill: nothing is installed, a hidden
97
+ skill's explicit invocation is dropped from the task, and `skill-used` never
98
+ fails. The result is `<name>--control.json` with `variant: "control"` in the
99
+ sidecar; `sweep --control` covers every scenario. `summarize` adds the mean
100
+ control score and the lift (skill score minus control score) per skill. A
101
+ scenario whose control passes every trial prints `NO LIFT`: it does not test
102
+ the skill.
165
103
 
166
- ```sh
167
- skillcheck run <scenario-dir> --judge openai:chat:gpt-5.6-sol --judge-effort high
168
- ```
104
+ ### Judges
169
105
 
170
- A provider-qualified judge authenticates through that provider's own env
171
- (`OPENAI_API_KEY`, plus `OPENAI_BASE_URL` for a gateway) and is recorded
172
- verbatim in the scorecard's `judge_model` column. For it, `--judge-effort`
173
- (minimal|low|medium|high) sets `reasoning_effort`. For a bare Claude judge,
174
- `--judge-effort` takes Claude's levels (low|medium|high|xhigh|max) and is passed
175
- as `effort` on either Anthropic path; the SDK judge starts Claude Code with
176
- `--effort`:
106
+ `--judge` takes a bare Claude model, graded through the Anthropic selection in
107
+ [auth](#auth), or a provider-qualified promptfoo id, passed through verbatim
108
+ and recorded in the scorecard's `judge_model`:
177
109
 
178
110
  ```sh
179
- skillcheck run <scenario-dir> --agent claude-opus-5-5 --agent-effort medium \
180
- --judge claude-opus-5-5 --judge-effort high --trials 3
111
+ skillcheck run <scenario-dir> --judge openai:chat:gpt-5.6-sol --judge-effort high
112
+ skillcheck run <scenario-dir> --judge claude-opus-5-5 --judge-effort high --trials 3
181
113
  ```
182
114
 
183
- The SDK judge runs Claude Code with auto memory off and a fixed session title.
184
- Each call gets a fresh temp working directory, and the memory section would
185
- put that path into the system prompt; without it, every call sends the same
186
- system prompt, which the prompt cache can share. A gateway that moves the
187
- caller's system prompt behind the first user message prevents that sharing.
188
- The fixed title saves the second request, on the judge model, that Claude Code
189
- otherwise sends per call to name the session.
115
+ `--judge-effort` takes `minimal|low|medium|high` for a provider-qualified
116
+ judge (`reasoning_effort`) and `low|medium|high|xhigh|max` for a Claude judge
117
+ (`effort`).
190
118
 
191
119
  ## Sweep
192
120
 
@@ -195,25 +123,17 @@ skillcheck sweep # scenarios without completed results
195
123
  skillcheck sweep --all # rerun everything
196
124
  ```
197
125
 
198
- Walks `<root>/skills/*/evals/*` and `<root>/cli/*/skills/*/evals/*`, in sorted
199
- order, sequentially. A scenario needs both `task.md` and `criteria.json` to be
200
- discovered. Exit 2 if anything errored, 1 if anything failed, else 0.
201
-
202
- `EVALS_CONCURRENCY` is passed to promptfoo as `-j` (default 4). It parallelizes
203
- the trials of one scenario, not separate scenarios. To spread scenarios, start
204
- several `skillcheck run` processes; each scenario has its own result, attempt
205
- marker, and scratch directory.
126
+ Runs every scenario under `<root>/skills/*/evals/*` and
127
+ `<root>/cli/*/skills/*/evals/*` sequentially. Exit 2 if anything errored, 1 if
128
+ anything failed, else 0.
206
129
 
207
- A scenario is skipped only when its completed result was graded with the same
208
- run configuration: agent model, agent effort, judge model, judge effort, and
209
- trial count. A result from another configuration is rerun and reported as
210
- `RERUN`.
211
-
212
- One known failure mode: judge calls through a gateway can drop at the transport
213
- layer ([uinaf/zebroid-infra#44](https://github.com/uinaf/zebroid-infra/issues/44)).
214
- That surfaces as an ERROR with no usable result, not as a graded FAIL, and the
215
- mitigation is a rerun. `sweep` without `--all` resumes, so a rerun picks up
216
- missing or ungraded results.
130
+ - A scenario is skipped only when its completed result used the same agent
131
+ model and effort, judge model and effort, and trial count. Others rerun as
132
+ `RERUN`.
133
+ - `EVALS_CONCURRENCY` (default 4) parallelizes the trials of one scenario. To
134
+ spread scenarios, start several `skillcheck run` processes.
135
+ - A gateway transport drop surfaces as an ERROR, not a graded FAIL. Rerun
136
+ `sweep`; it picks up missing and ungraded results.
217
137
 
218
138
  ## Summarize
219
139
 
@@ -222,42 +142,18 @@ skillcheck summarize [--allow-mixed]
222
142
  ```
223
143
 
224
144
  Reduces `<root>/.skillcheck/results/*.json` into
225
- `<root>/.skillcheck/scorecards/<UTC-date>.json`: one entry per scenario with
226
- skill, scenario, harness, tree sha, the trial aggregate from [trials](#trials),
227
- the run configuration, mean latency per trial, and tokens summed over trials.
228
- It then prints one row per skill and harness: scenarios, pass^k count, mean pass
229
- rate, mean score, and noisy count. Each noisy scenario follows on its own line.
230
-
231
- If a scorecard for today already exists, the two are merged on
232
- `(skill, scenario, harness)`: entries from this run win, entries it did not
233
- touch survive, and the merge is reported on stdout. Summarizing after rerunning
234
- six of twenty-nine scenarios therefore leaves twenty-nine rows in the file, not
235
- six. A same-date file that cannot be parsed stops the write instead of being
236
- overwritten.
237
-
238
- Rows for scenarios that no longer exist in the tree, whether carried from
239
- today's scorecard or left in `results/`, are dropped and counted on stdout.
240
- A root with no skills tree (`skills/` or `cli/*/skills/`) holds results only
241
- and keeps every row.
242
-
243
- Files that are not promptfoo results and ungraded transport errors are skipped
244
- with a warning rather than failing the reduction. Graded assertion failures
245
- remain scored results. A rubric item whose judge call failed (promptfoo tags it
246
- `graderError`) errors the trial instead, since it judged nothing. If a skipped file matches an existing scorecard row,
247
- summary generation fails and leaves the scorecard unchanged, so an errored rerun
248
- cannot carry forward its old score. A graded result for the same identity
249
- supersedes a skipped attempt only when the result file is newer. This also
250
- applies with `--allow-mixed`.
251
- Results from the retired Cursor harness are skipped with their original identity,
252
- so they cannot become Claude scores or silently carry an old Cursor row.
253
- Runs keep a `<name>.json.attempt` marker until a graded result and its provenance
254
- are written. The marker records the original skill, scenario, and harness. An outstanding marker makes `summarize` skip that identity even
255
- when the child produced no result file or left partial output. The marker does
256
- not count as a result for the sweep's existence check, so no-output failures
257
- remain eligible for retry.
258
- Long escaped names use a short hashed filename; the original identity is kept
259
- in the attempt marker and result sidecar. `sweep` retries existing results that
260
- contain no grade, including results written by older versions without a marker.
145
+ `<root>/.skillcheck/scorecards/<UTC-date>.json`, one entry per scenario with
146
+ the [trial aggregate](#trials), run configuration, mean latency, and summed
147
+ tokens. It prints one row per skill and harness, then each noisy scenario.
148
+
149
+ - An existing scorecard for today merges on `(skill, scenario, harness)`; this
150
+ run's entries win. A same-date file that cannot be parsed stops the write.
151
+ - Rows for scenarios no longer in the tree are dropped, unless the root has no
152
+ skills tree.
153
+ - Non-result files and ungraded transport errors are skipped with a warning. A
154
+ rubric item whose judge call failed errors the trial. If a skipped file
155
+ matches an existing scorecard row, `summarize` fails and leaves the scorecard
156
+ unchanged, so an errored rerun cannot carry forward its old score.
261
157
 
262
158
  ## Provenance
263
159
 
@@ -282,26 +178,17 @@ Each successful run writes a `<name>.meta.json` sidecar next to its result:
282
178
  }
283
179
  ```
284
180
 
285
- `summarize` reads those sidecars and refuses to mix skills-tree revisions or
286
- run configurations (agent model and effort, judge model and effort, trials,
287
- agent access, and isolation) in
288
- one scorecard, including retained rows from partial reruns, unless
289
- `--allow-mixed`. Configurations are compared within a harness, since harnesses
290
- differ by design. Sidecars written before run configurations were recorded fall
291
- back to the promptfoo config stored in the result.
292
- Rejection leaves the existing scorecard unchanged. With the override, the top-level `skills_tree_sha`
293
- becomes `mixed` and per-entry shas remain. A result with no sidecar reduces as
294
- `unattested`.
181
+ `summarize` refuses to mix skills-tree revisions or run configurations within
182
+ a harness, retained rows included, and leaves the scorecard unchanged.
183
+ `--allow-mixed` overrides it: the top-level `skills_tree_sha` becomes `mixed`.
184
+ A result with no sidecar reduces as `unattested`.
295
185
 
296
186
  ## State
297
187
 
298
- `<root>/.skillcheck/` holds `results/`, disposable and safe to gitignore, and
299
- `scorecards/`, the history to keep. In the isolated image it is a separate
300
- writable mount, so it can live outside the repository under test: a separate
301
- evals repository can pin the skill repository to a commit, keep its scorecards,
302
- and leave the skill repository with only scenarios and `skillcheck lint`. Scratch workdirs live under the
303
- system temp dir, outside the root. Nothing is ever written inside the installed
304
- package.
188
+ `<root>/.skillcheck/results/` is disposable; gitignore it.
189
+ `<root>/.skillcheck/scorecards/` is the history to keep. In the isolated image
190
+ `.skillcheck/` is a separate writable mount, so a separate evals repository can
191
+ pin the skill repository to a commit and keep the scorecards.
305
192
 
306
193
  ## Auth
307
194
 
@@ -314,12 +201,10 @@ package.
314
201
  | `OPENAI_API_KEY` | Agent auth for codex when there is no local login |
315
202
  | `OPENAI_API_KEY` + `OPENAI_BASE_URL` | A provider-qualified `--judge openai:…`, optionally via a gateway |
316
203
 
317
- A bare `--judge` model stays on the Anthropic selection regardless of the
318
- agent harness; a provider-qualified `--judge` uses that provider's env instead.
319
-
320
- The Claude agent loads project settings only, so an `apiKeyHelper` or `env`
321
- block in the operator's `~/.claude/settings.json` never reaches it; the run
322
- fails with `Not logged in`. Export the gateway variables instead:
323
- `ANTHROPIC_BASE_URL` and `ANTHROPIC_AUTH_TOKEN` set to the helper's output.
324
- Running from inside a Claude Code session also leaks that session's
325
- `CLAUDECODE` and `CLAUDE_CODE_*` variables into the agent; run from a plain shell.
204
+ - A bare `--judge` model uses the Anthropic selection whatever the harness.
205
+ - The Claude agent loads project settings only, so an `apiKeyHelper` or `env`
206
+ block in `~/.claude/settings.json` never reaches it and the run fails with
207
+ `Not logged in`. Export `ANTHROPIC_BASE_URL` and `ANTHROPIC_AUTH_TOKEN`
208
+ instead.
209
+ - Run from a plain shell. Inside a Claude Code session, its `CLAUDECODE` and
210
+ `CLAUDE_CODE_*` variables leak into the agent.