Behavioral evals run a skill without its reference files

Author: nucliwebCreated Sep 20, 2026Updated Sep 20, 2026

Problem

scripts/run-evals.js --behavioral gives the executor the text of SKILL.md and nothing else. The skill body is passed through --append-system-prompt, and the run happens with cwd set to a throwaway workspace that holds only the eval fixtures (scripts/run-evals.js:537-538). Every relative link in that text, whether references/floor-guard.md or ../../references/performance-checklist.md, points at a path that does not exist in the workspace.

So under the harness the agent is always the one that never opens a reference. That has two consequences:

  • A behavioral eval cannot pass or fail because of anything in a reference file. Content that moves out of SKILL.md leaves the tested surface entirely.
  • A green behavioral run on a PR that moves content into references/ says nothing about whether the split works: whether the agent opens the file at the right step, or gets a rule wrong when it doesn't.

Why it matters now

docs/skill-anatomy.md recommends progressive disclosure and a skill's own references/ directory. One skill uses it on main (constraint-driven-development/references/floor-guard.md), and #579 and #580 each move several hundred lines of security-and-hardening and performance-optimization behind that kind of link. Reviewing #580, the only real defects were in the condensed text left in SKILL.md (qualifiers dropped from an index rule, a Red Flag whose rule now lives only in the reference), and no gate could have caught them. The routing evals can't either, by design: they rank on name and description only.

Options

  1. Stage the skill directory in the workspace. Copy skills/<name>/ (and the root references/ at the matching relative depth) into the workspace and tell the executor where the skill lives, so its links resolve the way they do in an installed plugin. Smallest change that makes references reachable.
  2. Add a trace expectation for reference use. With option 1 in place, a case can assert "opened references/x.md before editing" from the tool calls the grader already reads. This is what would test a progressive-disclosure split.
  3. Document the limit in evals/README.md if neither is wanted: behavioral evals cover SKILL.md text only, so a PR that moves content to a reference needs its condensed text reviewed by hand.

Option 3 is cheap and worth doing regardless. I'm glad to take option 1 as a small focused PR if the direction looks right. One overlap to sequence: #455 changes how fixtures are copied into the eval workspace (the fs.cpSync call in the same function), so staging the skill directory should land after it and reuse its symlink handling.