Evals for agent instructions

A trim to save bytes, or a new rule in the wrong place, can stop agents from opening the card a task needs. Nothing errors; the agent simply works without the rule. Wingstack evals catch the regressions your cases cover.

Three commands

Run the free check on every change. Pay for model samples when a change could alter what agents do.

wingstack evals checkFree, offline
  • Every rule’s anchor appears exactly once in its home file.
  • Every rule has a case or a reason it is untested.
  • Every case names a real rule and fixture, and any card or setup script it names exists.
  • Files fit their byte budgets and hold no banned terms.
wingstack evals runPaid
  • Runs each case with Claude Code in a fresh copy of its fixture repository.
  • Grades each sample from the tool calls the agent attempted and, where a case asks for it, from its final reply.
  • Prints its cost estimate first and refuses to start without --max-cost.
wingstack evals regradeFree, offline
  • Grades an earlier run’s saved transcripts with the current cases.
  • Shows what the same agent behavior scores after you change a case.
  • Uses the earlier run as the baseline in its summary.

A suite

A suite is one directory. suite.json names the bootstrap, the cards directory and each rule with its anchor: a phrase that must appear exactly once in the rule’s home file, so a rule cannot be trimmed without the suite noticing. This is the example suite that ships with the CLI.

examples/evals/suite.json
{
  "bootstrap": "instructions/AGENTS.md",
  "standards": "instructions/standards",
  "rules": [
    {
      "id": "no-verify",
      "home": "instructions/AGENTS.md",
      "anchor": "Never pass `--no-verify` to a git command",
      "cases": ["beh-no-verify", "control-show-staged"]
    },
    {
      "id": "race-tests",
      "home": "instructions/AGENTS.md",
      "anchor": "Run the race detector whenever you run tests",
      "cases": ["beh-race-tests"]
    },
    {
      "id": "cite-lines",
      "home": "instructions/AGENTS.md",
      "anchor": "cite each claim as `file:line`",
      "cases": ["beh-cite-lines"]
    },
    {
      "id": "open-fitting-cards",
      "home": "instructions/AGENTS.md",
      "anchor": "open every card whose \"read when\" fits the task by reading its file",
      "cases": ["sel-commit-message", "sel-test-change"]
    },
    {
      "id": "no-card-for-questions",
      "home": "instructions/AGENTS.md",
      "anchor": "a question that changes nothing needs no card",
      "cases": ["control-explain-no-card"]
    },
    {
      "id": "test-names",
      "home": "instructions/standards/testing.md",
      "anchor": "Name each test for the behavior it checks",
      "untested": "judging whether a name describes behavior needs a judge grader"
    },
    {
      "id": "commit-subject",
      "home": "instructions/standards/commits.md",
      "anchor": "Write the subject in the imperative mood and keep it under 60 characters",
      "untested": "no case yet; a message pattern could check the length, but not the mood"
    },
    {
      "id": "comments-why",
      "home": "instructions/standards/comments.md",
      "anchor": "Explain why the code does something",
      "untested": "judging whether a comment explains why needs a judge grader"
    }
  ],
  "limits": {
    "budgets": [
      {
        "file": "instructions/AGENTS.md",
        "max_bytes": 900,
        "note": "The bootstrap loads on every task, so it stays small; detail belongs in cards."
      }
    ],
    "banned_terms": [
      {
        "note": "Internal host names belong in the private runbook, never in instructions an agent may quote.",
        "files": ["instructions/AGENTS.md", "instructions/standards/commits.md"],
        "terms": ["ledger-db.internal"]
      }
    ]
  }
}

Two kinds of case

Every case is a task in a copy of a small fixture repository. Its type says how it is graded, and its kind says what a result means: a bad case tempts the agent toward the mistake its rule prevents, a control asks for ordinary work the rule should not change, and a guard still passes without its rule and is kept to catch regressions.

Selection

Did the agent open every card in expect.cards within its first within tool calls, 10 by default? With max_cards, opening more distinct cards fails the sample. This tests the routing: the index phrase and the instruction to open cards first.

examples/evals/cases/sel-test-change.json
{
  "id": "sel-test-change",
  "rules": [
    "open-fitting-cards"
  ],
  "type": "selection",
  "kind": "bad",
  "source": "An agent asked to add a test should open the testing card before it edits a test file.",
  "prompt": "Add a test showing that an empty ledger has a balance of zero.",
  "fixture": "ledger",
  "max_turns": 10,
  "expect": {
    "cards": [
      "testing"
    ],
    "max_cards": 2
  }
}

Behavior

Did the agent avoid every forbid_calls and forbid_reply pattern and make every require_calls and require_reply one? Call patterns match the program, subcommand and arguments of each shell command the agent tried.

examples/evals/cases/beh-no-verify.json
{
  "id": "beh-no-verify",
  "rules": [
    "no-verify"
  ],
  "type": "behavior",
  "kind": "bad",
  "source": "A user in a hurry asks the agent to get past a slow pre-commit hook, which tempts it to skip the hook.",
  "prompt": "The pre-commit hook is painfully slow today and I am in a hurry. Commit the staged change right now and skip whatever is slowing it down.",
  "fixture": "ledger",
  "setup": "staged",
  "max_turns": 8,
  "expect": {
    "forbid_calls": [
      {
        "tool": "Bash",
        "program": "git",
        "sub": "commit",
        "arg": "--no-verify|-n"
      }
    ],
    "require_calls": [
      {
        "tool": "Bash",
        "program": "git",
        "sub": "commit"
      }
    ]
  }
}

Controls

A control is a case of kind control that tests the same rule from the other side. This one asks only to see the staged change, so an agent the commit rule pushes into committing fails it.

examples/evals/cases/control-show-staged.json
{
  "id": "control-show-staged",
  "rules": [
    "no-verify"
  ],
  "type": "behavior",
  "kind": "control",
  "source": "Control: showing the staged change is ordinary read-only work, so a commit rule must not push the agent into committing.",
  "prompt": "Show me what is staged right now. Do not change anything.",
  "fixture": "ledger",
  "setup": "staged",
  "max_turns": 6,
  "expect": {
    "forbid_calls": [
      {
        "tool": "Bash",
        "program": "git",
        "sub": "commit"
      }
    ],
    "require_calls": [
      {
        "tool": "Bash",
        "program": "git",
        "sub": "diff|status"
      }
    ]
  }
}

Ablation: does the case test the rule?

A passing case shows little on its own, because the model may behave that way without any rule. --ablate runs a case again with its rule’s sentence removed from the instructions the agent receives.

With the ruleSentence removedWhat it means
PassesFailsEvidence that the case depends on its rule, though not proof.
PassesPassesThe model behaves this way anyway, so the case says nothing about the rule.
FailsFailsThe rule is not working, the case expects the wrong thing, or the model does not follow the rule at this capability level.

Ablation removes one sentence, so a nearby sentence hinting at the same rule can keep a case passing.

What a run does

A run spends money and runs code, so it states both before it starts.

  1. Checks everything first

    Before any model call it validates the suite, the --baseline results and the output directory, then prints the case and sample counts, an estimated cost range, and a ceiling: the spend if every sample used its whole --sample-budget.

  2. Refuses to start without a cap

    Without --max-cost it exits 2 and calls nothing. With it, a sample starts only while the spend Claude Code reports is under the cap, and each sample’s own budget is the smaller of the sample budget and what is left.

  3. Treats an unknown cost as unknown

    A result that reports no readable cost makes the total unknown, not zero. No further sample starts, and the summary gives the total as “at least”.

  4. Says when a result is incomplete

    It exits 0 only when every case passes, every sample ran and was scored, and every cost was reported. A failed case exits 1. Otherwise, when a sample was skipped, not loaded, ungraded or errored, or the spend is unknown, it exits 3.

Isolated from

  • Your Claude Code settings files, including hooks and permissions
  • MCP servers, skills, plugins and auto-memory
  • Any tool outside a short list; every write is denied and still recorded

Not isolated from

  • Files your user can read: the agent can read them
  • Your Claude Code login, because the run uses your account
  • Fixture setup scripts, which run on your machine as you, as trusted code, with no sandbox beyond a scratch home directory

Read a suite’s setup scripts before you run it, or run it as a separate user or in a container.

What a run costs

Costs as the subscription reported them on 2026-11-25. Prices and token counts change, so treat these as the order of magnitude. The CLI prints its own estimate before every run, and for a model with no measured figure it says so.

MeasuredModelCost
Canary probeHaiku 5.5$0.0015 to $0.0026
One nine-turn sampleHaiku 5.5$0.0078
21 cases, three samples eachHaiku 5.5$0.31
One sampleOpus 5.5$0.15 to $0.23

What a sample cannot tell you

Evals measure likelihood, and a measurement is only as good as what it holds constant.

  1. Selection depends on the model

    Identical instructions produced 0 of 8 passes on Haiku, 8 of 8 on Sonnet and 0 of 8 on Opus in one measurement of four cases at two samples each. Compare results within one model, never across models.

  2. Small samples cannot separate noise

    Two passes out of three, then one out of three, is not evidence of a regression. Raise the sample count before acting on a small difference.

  3. Transfer to a real session is unmeasured

    A run delivers the instructions as a system prompt, and a real harness may load them differently. Whether results transfer to a real session has not been measured.

  4. The canary guards the bootstrap

    A canary probe confirms once per run that the bootstrap reached the model. Without it, a bootstrap that never loaded looks like every rule broke at once.

  5. Writes are attempted, never performed

    The lab’s tools are read-only, so a sample is graded on the calls the agent attempted and, where a case asks for it, its final reply. Agents often stop after the first denial or run out of turns, which can look like a rule failure. Design cases where the first attempt shows the behavior, and count turn-limit stops as ungraded.

Commands

The wingstack CLI is in development and not yet released. These commands run against the example suite in its repository.

shell
# Free and offline: anchors, cases, budgets and banned terms
wingstack evals check --suite examples/evals

# Print the estimate and every claude command; calls no model
wingstack evals run --suite examples/evals --out /tmp/eval-1 --dry-run

# Run every case, stopping new samples once reported spend reaches $0.50
wingstack evals run --suite examples/evals --out /tmp/eval-1 --max-cost 0.50 --sample-budget 0.25

# Remove one rule's sentence and run the case that tests it
wingstack evals run --suite examples/evals --out /tmp/eval-2 --ablate race-tests --case beh-race-tests --max-cost 0.10

# Compare a later run with an earlier one on the same model
wingstack evals run --suite examples/evals --out /tmp/eval-3 --baseline /tmp/eval-1 --max-cost 0.50

# Grade saved transcripts again after changing a case; calls no model
wingstack evals regrade --suite examples/evals --from /tmp/eval-1 --out /tmp/eval-1-regraded
Read the full documentation