Debian Codegraph @

evaluations/README.md

raw
1 # Evaluations
2
3 This directory holds the checked-in evaluation suites for `clnkr`.
4
5 Execution is owned by the external `clankerval` runner. Install it from [GitHub Releases](https://github.com/clnkr-ai/clankerval/releases).
6
7 The pinned runner version is enforced in [`Makefile`](../Makefile). Tasks now run from the repo root (`"working_directory": "."`) and verify outcomes with diff- and command-based graders instead of checked-in workspace snapshots.
8
9 ## Layout
10
11 ```text
12 evaluations/
13 suites/
14 <suite-id>/
15 suite.json
16 tasks/
17 <task-id>/
18 task.json
19 input/
20 instruction.txt
21 model-turns.json # mock-provider tasks only
22 project/
23 AGENTS.md # optional clnkr prompt file
24 trials/
25 <trial-id>/
26 bundle.json
27 raw/
28 normalized/
29 outcome/
30 reports/
31 open-test-report.xml
32 junit.xml
33 ```
34
35 Generated trial bundles live under `evaluations/trials/<trial-id>/`.
36
37 Generated run-level reports live under `evaluations/reports/`.
38
39 ## Task Conventions
40
41 - `suite.json` declares the suite id, mode, failure policy, task order, and optional default agent.
42 - `task.json` declares the instruction file, `working_directory`, step limit, grader config, and optional `scripted_turns_file`.
43 - `working_directory` must be `"."` with the current runner.
44 - Mock-provider tasks keep scripted turns in `input/model-turns.json`.
45 - Live-provider tasks verify outcomes with `outcome_diff`, `outcome_command_output`, and optional transcript grading.
46
47 ## Bundle Layout
48
49 Each trial bundle preserves both `raw/` and `normalized/` records.
50
51 - `raw/` keeps exact captured runtime data for debugging and replay-oriented inspection.
52 - `normalized/` keeps stable comparison/export data for grading, diffing, and report generation.
53
54 Current bundle structure:
55
56 ```text
57 evaluations/trials/<trial-id>/
58 bundle.json
59 raw/
60 agent/
61 commands.jsonl
62 provider-requests.jsonl
63 provider-responses.jsonl
64 normalized/
65 transcript.jsonl
66 outcome.json
67 graders.jsonl
68 outcome/
69 diff.patch
70 name-status.txt
71 numstat.txt
72 ```
73
74 ## Artifact Meanings
75
76 - `transcript`: the structured conversation and command lifecycle for a trial.
77 - `outcome`: the normalized end-state plus git diff artifacts for the trial.
78 - `grader`: one normalized grading record describing pass/fail status, message, and structured evidence.
79
80 Useful maintenance files:
81
82 - `raw/agent/`: native agent artifacts such as `trajectory.json` and `events.jsonl`.
83 - `normalized/transcript.jsonl`: canonicalized transcript records.
84 - `normalized/outcome.json`: normalized final outcome summary.
85 - `normalized/graders.jsonl`: one normalized record per enabled grader.
86 - `raw/commands.jsonl`: exact normalized command records from the run.
87 - `raw/provider-requests.jsonl`: exact provider requests captured during the run.
88 - `raw/provider-responses.jsonl`: exact provider responses captured during the run.
89 - `outcome/diff.patch`: patch-format git diff for the trial workspace.
90 - `outcome/name-status.txt`: git name-status summary for the trial workspace.
91 - `outcome/numstat.txt`: git numstat summary for the trial workspace.
92
93 ## Run
94
95 Mock-provider regression suite:
96
97 ```bash
98 make evaluations
99 ```
100
101 Live-provider evaluation suite:
102
103 ```bash
104 make evaluations-live-openai
105 make evaluations-live-anthropic
106 ```
107
108 Both make targets call `clankerval` directly after a `Makefile` preflight that requires `clankerval --version` to match the pinned version exactly.
109
110 Canonical CLI examples use `clankerval` directly:
111
112 ```bash
113 clankerval run --suite default
114 CLNKR_EVALUATION_MODE=live-provider clankerval run --suite default
115 ```
116
117 The provider-specific make targets are deterministic and then call `make evaluations-live`.
118
119 - `make evaluations-live-openai` reads `OPENAI_API_KEY`, optional `CLNKR_EVALUATION_OPENAI_BASE_URL`, and optional `CLNKR_EVALUATION_OPENAI_MODEL`
120 - `make evaluations-live-anthropic` reads `ANTHROPIC_API_KEY`, optional `CLNKR_EVALUATION_ANTHROPIC_BASE_URL`, and optional `CLNKR_EVALUATION_ANTHROPIC_MODEL`
121
122 `make evaluations-live` reads the first-wave runtime configuration from:
123
124 - `CLNKR_EVALUATION_MODE`
125 - `CLNKR_EVALUATION_API_KEY`
126 - `CLNKR_EVALUATION_BASE_URL`
127 - `CLNKR_EVALUATION_MODEL`
128
129 ## Inspect
130
131 After a run:
132
133 1. Read `evaluations/trials/<trial-id>/bundle.json` to identify the trial and its artifact paths.
134 2. Inspect `evaluations/trials/<trial-id>/normalized/transcript.jsonl` for canonical transcript flow.
135 3. Inspect `evaluations/trials/<trial-id>/normalized/outcome.json` for the normalized end-state.
136 4. Inspect `evaluations/trials/<trial-id>/normalized/graders.jsonl` for required/advisory grading results.
137 5. Inspect `evaluations/trials/<trial-id>/raw/commands.jsonl` and `evaluations/trials/<trial-id>/raw/agent/` for exact execution details.
138 6. Inspect `evaluations/trials/<trial-id>/outcome/diff.patch` when you need the concrete workspace diff.
139
140 The `evaluations/trials/` and `evaluations/reports/` directories are regenerated per run.