regen-eval-baseline
Skill7 starsChanged 42 days agoApache-2.0View on GitHub
Captures a promptfoo skill-eval baseline JSON for one sumo-qa skill and snapshots it to docs/qa/runs/eval-baselines/, with an automatic delta against the prior snapshot. Use this whenever the user mentions baselining a skill, capturing a before/after eval, running a single-skill eval, or measuring the effect of a SKILL.md edit, common during token-optimisation rounds. The actual work runs through a bundled script that handles path conventions, the Claude CLI check, and diffing in one go.
In this repository21 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- scaffold-sumo-qa-skillSkill
- sumo-qa-answering-testing-questionSkill
- sumo-qa-closing-qa-gapsSkill
- sumo-qa-creating-test-planSkill
- sumo-qa-deciding-approachSkill
- sumo-qa-executing-qa-rolloutSkill
- sumo-qa-finding-test-dataSkill
- sumo-qa-finishing-qa-workSkill
- sumo-qa-implementing-with-tddSkill
- sumo-qa-measuring-coverageSkill
- sumo-qa-planning-qa-rolloutSkill
- sumo-qa-preparing-for-workSkill
- sumo-qa-reviewing-before-mergeSkill
- sumo-qa-security-testingSkill
- sumo-qa-strategisingSkill
- sumo-qa-strengthening-testsSkill
- sumo-qa-suggesting-external-skillSkill
- sumo-qa-triaging-test-failuresSkill
- using-sumo-qaSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 63
If a prior snapshot for the same config exists, prints a delta: passed and failed counts vs the previous run.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
regen-eval-baseline
Captures a promptfoo run for one sumo-qa skill and stores its JSON output in docs/qa/runs/eval-baselines/ (gitignored). The deterministic work lives in scripts/run_baseline.py; this document is the guide for picking inputs and reading the output.
When to use
Trigger this skill when the user wants a per-skill eval snapshot. Common phrasings: "baseline this skill", "snapshot the eval", "run the eval for skill X", "capture before/after for the rewrite I just made". The user invokes it explicitly with /regen-eval-baseline; it doesn't auto-trigger.
This is single-skill on purpose. Full-sweep regeneration belongs on npm run eval:all, which runs the same tests/evals/promptfoo/skill-*.yaml files on the Claude pair sequentially without snapshotting.
Inputs
Pass exactly one config selector — either --skill (the base config) or --config (a suffixed scenario / .ab.yaml control / explicit path) — plus an optional --label.
--skill <name>— the base configtests/evals/promptfoo/skill-<name>.yaml. Resolves that file exactly; it never cross-matches a longer suffixed sibling (e.g.--skill reviewing-before-mergedrivesskill-reviewing-before-merge.yaml, NOTskill-reviewing-before-merge-adversarial.yaml). If the named config is absent the script lists the available configs.--config <selector>— for a suffixed scenario config or an.ab.yamlA/B control. Accepts a bare stem (skill-reviewing-before-merge-adversarial), a filename including the double suffix (skill-reviewing-before-merge-adversarial.ab.yaml), or a full/relative path. Resolved exactly — a stem composes one filename and that file must exist; the resolver never falls back to a near-named neighbour, so a base name can't accidentally snapshot a suffixed sibling and vice-versa.--label— short kebab-case tag for the snapshot, defaults tobaseline. Past conventions in the dir:baseline,postcut,greenfix, or describe-the-change likeremovability-gate. The label vocabulary is open-ended and may itself be multi-hyphen, so the snapshot filename separates the slug from the label with a literal__(double underscore) —<date>-skill-<slug>__<label>.json. Because a validated kebab slug/label can never contain__, the slug/label boundary stays unambiguous even for a multi-hyphen label. The label is what makes two snapshots taken on the same day distinguishable.
The snapshot filename derives from the resolved config, not just --skill: a .ab infix becomes a hyphen in the slug (skill-x-adversarial.ab.yaml → …-skill-x-adversarial-ab__<label>.json), so the base config, its suffixed scenario, and its .ab control each snapshot to a distinct, non-colliding path and diff only against their own prior snapshots.
Wrapper vs raw promptfoo eval -c
Use this wrapper (--skill / --config) whenever you want the repeatable before/after snapshot it exists to provide: it writes the dated JSON to docs/qa/runs/eval-baselines/, prints pass/fail, and diffs against the prior snapshot for the same config. That covers base configs, suffixed scenario configs, and .ab.yaml controls — drive all three through the wrapper so the baseline/postcut delta is preserved (don't hand-roll npx promptfoo eval -c … and lose the snapshot). Reach for raw promptfoo eval -c <path> only for flags the wrapper does not expose (e.g. --repeat N variance runs, -j 1 legible logs, generate dataset) — see tests/evals/promptfoo/README.md. For a normal baseline/postcut capture, the wrapper is the supported path.
Prerequisites the script will check
- The
claudeCLI must be on PATH and signed in. Every config pins the Claude eval pair (providers/claude-candidate.yaml+providers/claude-judge.yaml), which runs throughclaude -pon the user's Claude subscription, so no API key is involved. If the script reports the CLI missing, tell the user to install or sign in to Claude Code. - The selected config must exist:
tests/evals/promptfoo/skill-<name>.yamlfor--skill, or the exact suffixed /.ab.yamlconfig for--config. If it doesn't, the script lists every available config so the user can pick again — it does not guess a near-named sibling. - A snapshot at the target path already existing will block the run unless
--forceis passed. Don't pass--forcereflexively — snapshots are evidence of past runs and silently clobbering them loses history.
Run the script
# Base config:
python3 .claude/skills/regen-eval-baseline/scripts/run_baseline.py \
--skill <skill-name> \
--label <label>
# Suffixed scenario config (no rename to the base skill needed):
python3 .claude/skills/regen-eval-baseline/scripts/run_baseline.py \
--config skill-reviewing-before-merge-adversarial \
--label baseline
# .ab.yaml A/B control:
python3 .claude/skills/regen-eval-baseline/scripts/run_baseline.py \
--config skill-reviewing-before-merge-adversarial.ab.yaml \
--label postcutThe script:
- Computes the snapshot path:
docs/qa/runs/eval-baselines/<today>-skill-<slug>__<label>.json(the slug comes from the resolved config — see Inputs;__separates slug from label so a multi-hyphen label stays unambiguous). - Runs
npx promptfoo evalwith--no-cache(so the snapshot reflects fresh judge calls, not stale cache hits), writing the JSON output to a scratch file of the same name in a.partial/subdirectory of the baselines folder (promptfoo only accepts an output path with a known format extension such as.json). If the run is interrupted (Ctrl-C), the scratch file is removed and nothing is captured. - Checks the report records a verdict:
results.statspresent andresults.resultsa non-empty list. A report without them (for example{}) means no test case ran: a harness or config error, not a skill verdict and not a provider error, the same shaperun-eval.shexits 4 on. The script moves it aside to<snapshot>.rejected, prints no pass/fail summary and no delta, leaves every earlier snapshot untouched, and exits 4. A run where promptfoo wrote no report, or a report that is not JSON, is the same harness or config error: nothing is captured and the script exits 4, not promptfoo's own exit code. Check the config and its YAML in the promptfoo output, then re-run. - Checks the report for provider or judge errors (
stats.errors > 0, or a judge result taggedmetadata.graderError). A run with any is not a skill verdict: the script moves the report aside to<snapshot>.rejected, prints no pass/fail summary and no delta, leaves every earlier snapshot untouched, and exits 3. Resolve the error the report records (a Claude usage limit or a CLI failure) and re-run; do not hand a rejected report to theeval-failure-diagnoser. - Otherwise moves the report onto the snapshot path and prints pass/fail counts.
- If a prior snapshot for the same config exists, prints a delta: passed and failed counts vs the previous run.
Reading the output
The pass/fail summary tells you the state of the snapshot. The delta tells you whether the most recent SKILL.md edit moved the needle. Three patterns to watch for:
- Passes increased, failures decreased — the edit helped. Keep it.
- Passes decreased, failures increased — the edit hurt. Investigate before reverting; the failure may be informative.
- No change — either the edit was outside the assertions' coverage, or the judge gave the same verdict on different reasoning. Read the JSON's per-test reasons before drawing conclusions.
When FAILs appear
Don't propose loosening the rubric. The standing repo policy (feedback_eval_fixes_target_skill_not_rubric) is to strengthen the SKILL.md so the candidate naturally satisfies the existing rubric. Hand the failing snapshot to the eval-failure-diagnoser subagent — it reads the JSON, locates the failing assertion, and recommends a concrete SKILL.md edit. Re-run this skill after the edit to confirm the failure flipped.
Why the snapshots are gitignored
docs/qa/ is excluded from the repo (.gitignore line 48). Eval snapshots are local evidence — useful for the contributor doing the optimisation work, but not artefact that ships with the package. Per feedback_no_process_artifacts_in_public_repo, results live alongside the QA work, not in the public source tree. Don't propose committing snapshots or removing the gitignore entry.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

