Pages

File contracts

Every file a suite holds and a run writes, with its fields. Unknown fields in a suite are errors, so a misspelled key fails wingstack evals check instead of silently disabling an expectation.

suite.json

  • bootstrap (string, required): the always-on instruction file, relative to the suite directory.
  • standards (string): the cards directory, below the bootstrap's directory. Required for selection cases.
  • rules (list, required): one object per rule, below.
  • limits.budgets (list, required): {file, max_bytes, note}; check fails when file is larger than max_bytes bytes.
  • limits.banned_terms (list): {files, terms, note}; check fails when any of files contains any of terms, matched case-insensitively.

A rule is:

  • id (string, required): unique.
  • home (string, required): the file holding the rule.
  • anchor (string, required): a phrase found exactly once in home, whitespace collapsed. It may not sit inside another rule's anchor in the same file.
  • cases (list): the case ids that test the rule; each case must list the rule back.
  • untested (string): why the rule has no case. A rule has cases or untested, never both.

cases/<id>.json

  • id (string, required): equal to the file name without .json.
  • rules (list, required): the rules the case tests.
  • type (required): selection or behavior.
  • kind (required): bad, guard or control.
  • source (string, required): the scenario in plain words, so a reader knows why the case exists.
  • prompt (string, required): the task, sent as the user's message.
  • fixture (string, required): a directory name under fixtures/.
  • setup (string): a script name; runs fixtures/<fixture>/.eval/<setup>.sh.
  • max_turns (number): the turn cap passed to claude (default 12).
  • expect (object, required): the graders, below.

expect holds:

  • cards (list): for a selection case, card names that must be opened.
  • within (number): the call window for cards (default 10).
  • max_cards (number): when present, the most distinct cards the sample may open; 0 means none. A behavior case may use it too, so a control can forbid card reads.
  • require_calls, forbid_calls (lists of call patterns).
  • require_reply, forbid_reply (lists of Go regular expressions).

A call pattern holds tool (required) and, as described in the writing-suites page, program, sub, arg, paths, message, pattern, added and before. Every field is a Go regular expression. A pattern whose tool can match Bash needs program and cannot use pattern or added; a pattern that cannot match Bash cannot use the Bash word fields.

The run directory

  • results.jsonl: one object per sample with case, rules, type, kind, sample, model, status (pass, fail, not-loaded, ungraded, skipped or error), reasons, notes, cost_usd, cost_unknown (present and true when claude reported no readable cost), turns, calls (index, tool, text), reply and transcript.
  • run.json: suite, out, bootstrap, bootstrap_sha256, standards_mount, ablate, model, samples, jobs, sample_budget_usd, max_cost_usd, cases, baseline, started, claude_version, sample_tools, disabled_plugins, probe_loaded, probe_cost_usd, probe_cost_known, interrupted and over_cap (present and true when reported spend passed the cap).
  • summary.md, bootstrap-delivered.md, probe.jsonl and transcripts/<case>-<sample>.jsonl, as described in the running-evals page.

wingstack evals regrade reads results.jsonl, run.json and transcripts/ from --from, and writes results.jsonl and summary.md to --out.

run and regrade claim their --out by creating .wingstack-claim with an exclusive create before any model call or write, and neither uses a directory that already holds a claim, run.json, results.jsonl, summary.md, probe.jsonl or transcripts. A dry run writes no claim but refuses a claimed directory.

Command output

Every command takes -o pretty, -o json or -o plain, before or after the verb, as in wingstack evals -o json check. Without the flag, output is pretty on a terminal and JSON on a pipe, except that wingstack docs read prints Markdown unless -o json is given. An invalid mode is a usage error. JSON output is one compact object per line, and each object's kind names it:

  • wingstack evals check: a finding record per finding (message), then one check record (suite, rules, cases, findings, clean).
  • wingstack evals run and regrade: an estimate record (run only), a command record per command on a dry run, then a probe record (loaded, cost_usd, cost_known, error), a sample record as each sample finishes, a case record per case with its verdict and counts, and one summary record (out, cost_usd, cost_unknown, exit).
  • wingstack docs: a page record per page (slug, title, blurb). wingstack docs read --slug <slug> -o json emits one page record that adds the body. wingstack docs --web -o json emits one docs-web record with the url, then serves until interrupted.
  • Help and wingstack info --for-agent emit one help or agent-context record with a text field.

Progress and diagnostics go to stderr.

Exit codes

  • 0: success; for a run or regrade, every case passed, every sample was scored, and every cost was reported.
  • 1: a check finding, a failed case, or an operational error such as an unreadable suite.
  • 2: a usage error, or a run refused for lack of --max-cost.
  • 3: a run or regrade where nothing failed but the result is incomplete: a sample was skipped, not loaded, ungraded or errored, the spend is unknown, or the spend passed the cap.
  • 130: a run interrupted by SIGINT or SIGTERM, after it cleaned up and wrote partial results.

Environment

  • claude must be on PATH for a real run; a dry run does not need it.
  • TMPDIR holds the fixture copies and the private copy of the delivered bootstrap.

In a terminal: wingstack docs read --slug file-contracts

Built from commit d0fd30a44c8b (2026-11-26).