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};checkfails whenfileis larger thanmax_bytesbytes.limits.banned_terms(list):{files, terms, note};checkfails when any offilescontains any ofterms, 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 inhome, 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 hascasesoruntested, 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):selectionorbehavior.kind(required):bad,guardorcontrol.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 underfixtures/.setup(string): a script name; runsfixtures/<fixture>/.eval/<setup>.sh.max_turns(number): the turn cap passed toclaude(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 forcards(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 withcase,rules,type,kind,sample,model,status(pass,fail,not-loaded,ungraded,skippedorerror),reasons,notes,cost_usd,cost_unknown(present and true whenclaudereported no readable cost),turns,calls(index,tool,text),replyandtranscript.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,interruptedandover_cap(present and true when reported spend passed the cap).summary.md,bootstrap-delivered.md,probe.jsonlandtranscripts/<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: afindingrecord per finding (message), then onecheckrecord (suite,rules,cases,findings,clean).wingstack evals runandregrade: anestimaterecord (run only), acommandrecord per command on a dry run, then aproberecord (loaded,cost_usd,cost_known,error), asamplerecord as each sample finishes, acaserecord per case with itsverdictand counts, and onesummaryrecord (out,cost_usd,cost_unknown,exit).wingstack docs: apagerecord per page (slug,title,blurb).wingstack docs read --slug <slug> -o jsonemits onepagerecord that adds thebody.wingstack docs --web -o jsonemits onedocs-webrecord with theurl, then serves until interrupted.- Help and
wingstack info --for-agentemit onehelporagent-contextrecord with atextfield.
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
claudemust be onPATHfor a real run; a dry run does not need it.TMPDIRholds the fixture copies and the private copy of the delivered bootstrap.