@bjoernrochel/sevro 0.1.0-rc.12 → 0.1.0-rc.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/CONTRIBUTING.md +13 -2
  2. package/README.md +5 -0
  3. package/docs/README.md +4 -0
  4. package/docs/contracts.md +1 -0
  5. package/docs/creating-cases.md +9 -2
  6. package/docs/development-cli.md +93 -8
  7. package/docs/documentation-quality.md +12 -2
  8. package/docs/evaluation-workflow.md +107 -0
  9. package/docs/evidence/code-mode-programs-85.md +64 -0
  10. package/docs/evidence.md +1 -0
  11. package/docs/getting-started.md +23 -2
  12. package/docs/identity-v1.md +15 -1
  13. package/docs/installing.md +11 -11
  14. package/docs/native-controls.md +7 -3
  15. package/docs/native-hosts.md +17 -0
  16. package/docs/reading-results.md +13 -0
  17. package/docs/recipes.md +485 -0
  18. package/docs/releases.md +2 -1
  19. package/docs/report-v1.md +13 -1
  20. package/docs/results-v1.md +22 -0
  21. package/docs/run-settings-v1.md +147 -0
  22. package/docs/runtime-v1.md +21 -8
  23. package/docs/troubleshooting.md +12 -12
  24. package/docs/typescript-quality.md +38 -16
  25. package/docs/usability-study.md +114 -0
  26. package/examples/recipes/candidate.ts +26 -0
  27. package/examples/recipes/cases/coding-change.json +21 -0
  28. package/examples/recipes/cases/host-tools.json +21 -0
  29. package/examples/recipes/cases/mise.json +21 -0
  30. package/examples/recipes/cases/node.json +21 -0
  31. package/examples/recipes/cases/python-uv.json +21 -0
  32. package/examples/recipes/cases/semantic.json +17 -0
  33. package/examples/recipes/coding-change/check.ts +23 -0
  34. package/examples/recipes/extension-artifacts.ts +65 -0
  35. package/examples/recipes/extension-methods.ts +174 -0
  36. package/examples/recipes/extension.ts +37 -0
  37. package/examples/recipes/repository-skill/.agents/skills/startup-guide/SKILL.md +7 -0
  38. package/examples/recipes/repository-skill/.claude/skills/startup-guide/SKILL.md +7 -0
  39. package/examples/recipes/repository-skill/README.md +3 -0
  40. package/examples/recipes/run-inputs.ts +188 -0
  41. package/examples/recipes/run-options.ts +131 -0
  42. package/examples/recipes/run.ts +63 -0
  43. package/examples/recipes/runtime/empty.json +1 -0
  44. package/examples/recipes/runtime/goals.json +1 -0
  45. package/examples/recipes/runtime/mise.json +6 -0
  46. package/examples/recipes/runtime/path.json +1 -0
  47. package/examples/recipes/runtime/plugins.json +4 -0
  48. package/examples/recipes/runtime/python-uv.json +10 -0
  49. package/examples/recipes/semantic-judge.ts +29 -0
  50. package/examples/templates/coding/adapter.ts +17 -0
  51. package/examples/templates/coding/case.json +15 -0
  52. package/examples/templates/repository-skill/.agents/skills/startup-guide/SKILL.md +6 -0
  53. package/examples/templates/repository-skill/extension-data.ts +64 -0
  54. package/examples/templates/repository-skill/extension.ts +31 -0
  55. package/examples/templates/response/adapter.ts +12 -0
  56. package/examples/templates/response/case.json +13 -0
  57. package/package.json +1 -1
  58. package/schemas/run-evidence-v1.schema.json +2 -1
  59. package/src/case-validation.ts +71 -48
  60. package/src/cli/command.ts +54 -3
  61. package/src/cli/completion.ts +12 -0
  62. package/src/cli/demo.ts +59 -0
  63. package/src/cli/evaluation.ts +9 -1
  64. package/src/cli/help.ts +187 -0
  65. package/src/cli/hosts.ts +21 -3
  66. package/src/cli/init-settings.ts +30 -0
  67. package/src/cli/init.ts +111 -0
  68. package/src/cli/invocation.ts +99 -78
  69. package/src/cli/loading.ts +16 -9
  70. package/src/cli/preparation.ts +2 -1
  71. package/src/cli/presentation.ts +23 -20
  72. package/src/cli/progress.ts +6 -0
  73. package/src/cli/run-manifest.ts +133 -0
  74. package/src/cli/run-options.ts +101 -0
  75. package/src/cli/run-overrides.ts +83 -0
  76. package/src/cli/settings.ts +160 -0
  77. package/src/cli/summary.ts +43 -0
  78. package/src/cli.ts +8 -1
  79. package/src/engine.ts +1 -0
  80. package/src/evaluation/plan.ts +8 -1
  81. package/src/evaluation/progress.ts +19 -0
  82. package/src/evaluation/run.ts +7 -0
  83. package/src/evaluation/trial.ts +22 -1
  84. package/src/evaluation/types.ts +12 -0
  85. package/src/generated/run-evidence.cjs +1 -1
  86. package/src/hosts/codex-command-output.ts +15 -2
  87. package/src/hosts/codex-exec-controls.ts +52 -4
  88. package/src/hosts/codex-native-calls.ts +42 -13
  89. package/src/hosts/codex-profile.ts +1 -0
  90. package/src/hosts/codex-skill-reads.ts +249 -26
  91. package/src/provenance.ts +24 -4
  92. package/src/report.ts +37 -2
  93. package/src/runtime/config.ts +1 -1
  94. package/src/schema-types.ts +1 -0
@@ -18,12 +18,25 @@ aggregation, and exit-code precedence.
18
18
  Completed trial evidence is saved under `--results-root` before cleanup.
19
19
  Do not assume a run-directory name or publish private host artifacts.
20
20
 
21
+ Human output lists each trial, failed/unavailable check
22
+ reasons, measured candidate duration, unknown/known usage and retained paths.
23
+ Preparation/candidate/grading/evidence progress appears on stderr. Stage completion
24
+ means the attempt ended; read the three result states to determine its outcome.
25
+ See the [evaluation workflow](evaluation-workflow.md) for the complete progression.
26
+
21
27
  ## Summarize runs
22
28
 
23
29
  ```sh
24
30
  sevro report --json --result-file /absolute/path/sevro-result.json
25
31
  ```
26
32
 
33
+ `sevro report --latest` uses the most recently retained CLI result in
34
+ `<cwd>/.sevro/results`. Add
35
+ `--results-root ./other-results` to select another root. Dry/failed runs may be
36
+ latest; a pre-run error does not replace it. CLI `--result-file` also accepts
37
+ cwd-relative paths. Missing result or referenced evidence is an error, never
38
+ a fabricated row.
39
+
27
40
  The command assumes [Sevro is on `PATH`](installing.md#make-the-command-available).
28
41
  For a contributor checkout, use `bun src/cli.ts` in place of `sevro`.
29
42
  [Report v1](report-v1.md) defines fields and limits. Missing cost, usage, or
@@ -0,0 +1,485 @@
1
+ # Run complete evaluation recipes
2
+
3
+ Copy a recipe, run its positive and negative controls, then select a native
4
+ model. The complete projects live in [examples/recipes](../examples/recipes).
5
+ They include cases, fixtures, evaluator checks, runtime files, adapters, and a
6
+ small extension.
7
+
8
+ ## Prepare a recipe project
9
+
10
+ Use Bun 1.3.13, Git, Node 24.13.0, and `rg`. Shell checks need macOS
11
+ `sandbox-exec` or Ubuntu `bubblewrap`; native Claude also needs `socat` on
12
+ Ubuntu. Python/UV and mise add the prerequisites stated below.
13
+ [Install Sevro](installing.md), then set the recipe path from the directory
14
+ containing its local installation:
15
+
16
+ ```sh
17
+ export SEVRO_RECIPES="$PWD/node_modules/@bjoernrochel/sevro/examples/recipes"
18
+ ```
19
+
20
+ Run commands below from an otherwise empty working directory to keep generated
21
+ outputs together. The launcher uses
22
+ the CLI beside its original package; it does not require a global installation.
23
+
24
+ To adapt a separate copy, preserve the small project's whole directory:
25
+
26
+ ```sh
27
+ export SEVRO_RECIPE_CLI="$(cd "$SEVRO_RECIPES/../../src" && pwd)/cli.ts"
28
+ cp -R "$SEVRO_RECIPES" ./my-recipes
29
+ export SEVRO_RECIPES="$PWD/my-recipes"
30
+ ```
31
+
32
+ Each command saves `result.json`, the materialized case or extension command,
33
+ and retained evidence under `.sevro-recipes/<recipe>/<route>/<mode>/` in your
34
+ current directory. The project snapshot is separate from recipe inputs and
35
+ results. Stderr names the exact result path and effective settings; stdout is
36
+ one `sevro.cli-result.v1` JSON document. Follow its absolute `evidencePath`.
37
+ The launcher supplies explicit source, project, config, runtime, isolation,
38
+ condition, trial and threshold options; inspect [run.ts](../examples/recipes/run.ts)
39
+ and the saved inputs when adapting a plain CLI invocation. Existing results
40
+ remain until you remove their directory.
41
+
42
+ For every deterministic positive control, expect exit `0`, execution
43
+ `completed`, grading `completed`, task `passed`. Each separate `--fail` command
44
+ deliberately exits `1` with execution/grading `completed` and task `failed`.
45
+ Run negative controls separately when using a shell with `set -e`. A missing
46
+ tool is a prerequisite error, not a passing or intentionally failing control.
47
+
48
+ `candidate.ts` is an explicitly trusted deterministic fixture editor. It changes
49
+ the arithmetic implementation for the coding recipe and supplies a fixed answer
50
+ for the other controls. It does not simulate native tool permissions: the real
51
+ isolated shell graders execute the stated tools and assertions. Native routes
52
+ run the actual task with the same fixture and runtime policy.
53
+
54
+ For any recipe that offers a deterministic control, replace `deterministic`
55
+ with `codex` or `claude` to use a real participant. First install/authenticate
56
+ the selected [native CLI](native-hosts.md). For Codex, set the model to an
57
+ available identifier and supply your private authentication file path:
58
+
59
+ ```sh
60
+ export SEVRO_RECIPE_MODEL='replace-with-an-available-Codex-model'
61
+ export SEVRO_RECIPE_CODEX_AUTH="${CODEX_HOME:-$HOME/.codex}/auth.json"
62
+ bun "$SEVRO_RECIPES/run.ts" coding-change codex --dry
63
+ bun "$SEVRO_RECIPES/run.ts" coding-change codex
64
+ ```
65
+
66
+ For Claude, use its supported credential route and a Claude model identifier:
67
+
68
+ ```sh
69
+ export SEVRO_RECIPE_MODEL='replace-with-an-available-Claude-model'
70
+ bun "$SEVRO_RECIPES/run.ts" coding-change claude --dry
71
+ bun "$SEVRO_RECIPES/run.ts" coding-change claude
72
+ ```
73
+
74
+ Substitute the other recipe name to run its native task. `--dry` prepares and
75
+ retains inputs without calling a model; remove it for execution. Add `--fail`
76
+ to a live command for its deliberate negative control. Native model outcomes
77
+ must be observed; a model can ignore a negative-control instruction. The
78
+ semantic recipe additionally requires its judge route described below.
79
+
80
+ ## Fix a coding bug with hidden evaluator checks
81
+
82
+ Files: [coding-change case](../examples/recipes/cases/coding-change.json),
83
+ [typed evaluator test](../examples/recipes/coding-change/check.ts),
84
+ [tool configuration](../examples/recipes/runtime/path.json), and
85
+ [candidate](../examples/recipes/candidate.ts). Prerequisite: Node on `PATH`.
86
+ The fixture contains a broken `math.cjs` and a task README. The task asks the
87
+ participant to implement addition. The evaluator checks positive, negative and
88
+ zero arguments. Its source stays outside the candidate fixture: the launcher
89
+ transpiles the checked TypeScript test and embeds its JavaScript in the
90
+ evaluator-owned shell command before execution.
91
+
92
+ <!-- sevro-example:recipe-coding-change-pass -->
93
+
94
+ ```sh
95
+ bun "$SEVRO_RECIPES/run.ts" coding-change deterministic
96
+ ```
97
+
98
+ The isolated check first asserts that the original evaluator test is unreadable,
99
+ then runs Node against the changed fixture. The passing shell observation
100
+ retains the result and stdout digest. The negative control leaves subtraction
101
+ in place, so the arithmetic assertion fails:
102
+
103
+ <!-- sevro-example:recipe-coding-change-fail -->
104
+
105
+ ```sh
106
+ bun "$SEVRO_RECIPES/run.ts" coding-change deterministic --fail
107
+ ```
108
+
109
+ Use a native route below to evaluate an actual coding agent. Adding a participant
110
+ test to the fixture would make it visible; it would not replace this hidden
111
+ evaluator-owned check. The launcher selects `--shell-isolation` and protects
112
+ the recipe source; declare additional private worktrees through the
113
+ [CLI's protected roots](development-cli.md).
114
+
115
+ ## Add host-tool access, one capability at a time
116
+
117
+ The smallest useful runtime file is
118
+ [runtime/empty.json](../examples/recipes/runtime/empty.json):
119
+
120
+ ```json
121
+ { "format": "sevro.runtime.v1" }
122
+ ```
123
+
124
+ It selects the existing isolation defaults without importing tools or hooks.
125
+ Add only a declared non-secret `PATH` to reuse installed tools:
126
+
127
+ ```json
128
+ {
129
+ "format": "sevro.runtime.v1",
130
+ "environment": { "inherit": ["PATH"] }
131
+ }
132
+ ```
133
+
134
+ Sevro filters credential-related PATH entries, discovers bounded installation
135
+ support trees, grants read-only tool access, and keeps private writable home
136
+ and temporary directories. It does not grant the full operator home. Runtime
137
+ values enter retained evidence; do not put secrets in this file. See
138
+ [runtime details](runtime-v1.md#environment-and-host-tools).
139
+
140
+ ### Minimal tool: ripgrep
141
+
142
+ Files: [host-tools case](../examples/recipes/cases/host-tools.json) and
143
+ [PATH runtime](../examples/recipes/runtime/path.json). Prerequisite: standalone `rg` on
144
+ `PATH`, installed outside Codex/Claude credential directories (for example,
145
+ `brew install ripgrep` on macOS or `apt-get install ripgrep` on Ubuntu).
146
+ Sevro deliberately filters a Codex session's injected `~/.codex/.../rg` path;
147
+ that embedded executable alone does not satisfy this recipe. The fixture's `app.env` contains `port=3000`; an actual isolated `rg`
148
+ process must find exactly that line.
149
+
150
+ <!-- sevro-example:recipe-host-tools-pass -->
151
+
152
+ ```sh
153
+ bun "$SEVRO_RECIPES/run.ts" host-tools deterministic
154
+ ```
155
+
156
+ The negative fixture contains port `9000`, so that same search fails:
157
+
158
+ <!-- sevro-example:recipe-host-tools-fail -->
159
+
160
+ ```sh
161
+ bun "$SEVRO_RECIPES/run.ts" host-tools deterministic --fail
162
+ ```
163
+
164
+ ### Node
165
+
166
+ Files: [Node case](../examples/recipes/cases/node.json) and the same PATH runtime.
167
+ Prerequisite: Node 24 on `PATH`. The fixture contains `app.json`. A real isolated
168
+ Node process parses it, asserts the port, and prints `3000`.
169
+
170
+ <!-- sevro-example:recipe-node-pass -->
171
+
172
+ ```sh
173
+ bun "$SEVRO_RECIPES/run.ts" node deterministic
174
+ ```
175
+
176
+ The negative fixture sets port `9000`, causing the Node assertion to fail:
177
+
178
+ <!-- sevro-example:recipe-node-fail -->
179
+
180
+ ```sh
181
+ bun "$SEVRO_RECIPES/run.ts" node deterministic --fail
182
+ ```
183
+
184
+ ### Python with UV
185
+
186
+ Files: [Python/UV case](../examples/recipes/cases/python-uv.json) and
187
+ [UV runtime](../examples/recipes/runtime/python-uv.json). Install `uv` and an
188
+ existing Python 3 first; CI uses UV `0.11.21`. Both executables must be on
189
+ `PATH`. The launcher selects `python3`; optionally export `RECIPE_PYTHON` to
190
+ the absolute existing interpreter you want. Put that interpreter's installation
191
+ bin on `PATH` too, so its bounded support installation can be discovered.
192
+
193
+ This adds a private writable `UV_CACHE_DIR` and disables Python downloads.
194
+ `uv run --offline --no-project` runs the selected existing interpreter, with no
195
+ dependency resolution or network. Python parses the fixture JSON, asserts its
196
+ port and prints `3000`:
197
+
198
+ <!-- sevro-example:recipe-python-uv-pass -->
199
+
200
+ ```sh
201
+ bun "$SEVRO_RECIPES/run.ts" python-uv deterministic
202
+ ```
203
+
204
+ The negative fixture changes the port to `9000`; Python raises an assertion:
205
+
206
+ <!-- sevro-example:recipe-python-uv-fail -->
207
+
208
+ ```sh
209
+ bun "$SEVRO_RECIPES/run.ts" python-uv deterministic --fail
210
+ ```
211
+
212
+ For real dependencies, prepare a public cache before evaluation and add a
213
+ declared [seed directory](runtime-v1.md#private-writable-state), then use your locked
214
+ offline install command. This dependency-free recipe needs no cache seed.
215
+
216
+ ### An existing mise installation
217
+
218
+ Files: [mise case](../examples/recipes/cases/mise.json),
219
+ [runtime](../examples/recipes/runtime/mise.json), and the selection in
220
+ [run-options.ts](../examples/recipes/run-options.ts). Install mise first; CI
221
+ uses `2026.3.13`. Prepare its exact tool before evaluation:
222
+
223
+ ```sh
224
+ mise install node@24.13.0
225
+ mise where node@24.13.0
226
+ ```
227
+
228
+ The launcher asks `mise where node@24.13.0`, prepends that installation's `bin`
229
+ to the declared PATH, then runs its Node inside isolation. The evaluator checks
230
+ the exact Node version and fixture port and prints `3000`. This route executes
231
+ the resolved versioned tool; it does not run a mutable mise shim inside the
232
+ sandbox or grant mise's whole data directory.
233
+
234
+ <!-- sevro-example:recipe-mise-pass -->
235
+
236
+ ```sh
237
+ bun "$SEVRO_RECIPES/run.ts" mise deterministic
238
+ ```
239
+
240
+ The negative fixture changes the port to `9000`, failing the same Node check:
241
+
242
+ <!-- sevro-example:recipe-mise-fail -->
243
+
244
+ ```sh
245
+ bun "$SEVRO_RECIPES/run.ts" mise deterministic --fail
246
+ ```
247
+
248
+ An attempted isolated `mise exec` with read-only operator data returned
249
+ `Operation not permitted` on macOS. If your shim needs extra discovery or
250
+ writable state, resolve the existing installation before launch as above.
251
+ Do not solve that failure by granting the operator's whole home.
252
+
253
+ ## Evaluate a repository skill with Codex or Claude
254
+
255
+ Files: the complete [sample repository](../examples/recipes/repository-skill/README.md),
256
+ its [Codex skill](../examples/recipes/repository-skill/.agents/skills/startup-guide/SKILL.md),
257
+ its [Claude skill](../examples/recipes/repository-skill/.claude/skills/startup-guide/SKILL.md),
258
+ and the [extension](../examples/recipes/extension.ts). The extension builds a
259
+ fresh committed Git fixture and mounts the selected skill as a Git-excluded
260
+ artifact. The README is participant-visible; checks and extension source stay
261
+ outside. Copy these actual skill bodies and their supporting files when
262
+ substituting your own skill.
263
+
264
+ Install the [native host prerequisites](native-hosts.md). Dry preparation needs
265
+ the selected CLI on PATH, but no model login or quota. It negotiates repository
266
+ invocation, mounts and hashes the actual skill, validates the case and runtime,
267
+ and retains the artifacts. Expect exit `0`, execution `not_run`, grading
268
+ `not_requested`, task `not_assessed`:
269
+
270
+ <!-- sevro-example:recipe-repository-skill-codex-dry -->
271
+
272
+ ```sh
273
+ bun "$SEVRO_RECIPES/run.ts" repository-skill codex --dry
274
+ ```
275
+
276
+ <!-- sevro-example:recipe-repository-skill-claude-dry -->
277
+
278
+ ```sh
279
+ bun "$SEVRO_RECIPES/run.ts" repository-skill claude --dry
280
+ ```
281
+
282
+ For a real Codex trial, export `SEVRO_RECIPE_MODEL` to an available Codex model
283
+ and `SEVRO_RECIPE_CODEX_AUTH` to your private absolute `auth.json` path, then
284
+ remove `--dry`. For Claude, export `SEVRO_RECIPE_MODEL` to an available Claude
285
+ model and authenticate through one of its documented credential routes, then
286
+ remove `--dry`. Credentials stay outside recipe/project inputs and argv.
287
+ These calls consume account quota.
288
+
289
+ ```sh
290
+ bun "$SEVRO_RECIPES/run.ts" repository-skill codex
291
+ bun "$SEVRO_RECIPES/run.ts" repository-skill codex --fail
292
+ ```
293
+
294
+ With `SEVRO_RECIPE_MODEL` set for Claude instead:
295
+
296
+ ```sh
297
+ bun "$SEVRO_RECIPES/run.ts" repository-skill claude
298
+ bun "$SEVRO_RECIPES/run.ts" repository-skill claude --fail
299
+ ```
300
+
301
+ The neutral invocation placeholder becomes `$startup-guide` for Codex and
302
+ `/startup-guide` at the start of Claude's prompt. Claude uses the required
303
+ `--claude-project-settings`; its runtime leaves goals/hooks disabled. Passing
304
+ requires answer content (command and port), the prepared-file assertion, and a
305
+ complete explicit-invocation receipt. That receipt proves the bounded dispatch,
306
+ not general grounding or quality across other questions.
307
+
308
+ The deliberate failure is the same command without `--dry`, with `--fail`
309
+ added. It explicitly requests the wrong response; expected task verdict is
310
+ `failed`, exit `1`. An actual model can disregard a negative-control prompt;
311
+ inspect its observed answer and receipt if it unexpectedly passes. Dry
312
+ `--fail` only validates that negative-control preparation; it does not observe
313
+ model failure.
314
+
315
+ ## Add a separate semantic judge
316
+
317
+ Files: [semantic case](../examples/recipes/cases/semantic.json), candidate
318
+ adapter and [protocol judge](../examples/recipes/semantic-judge.ts). The case
319
+ asks for the startup explanation and declares a proposition requiring the
320
+ command and port. These credential-free controls exercise routing, source
321
+ construction, verdict parsing, and retained semantic evidence:
322
+
323
+ <!-- sevro-example:recipe-semantic-pass -->
324
+
325
+ ```sh
326
+ bun "$SEVRO_RECIPES/run.ts" semantic deterministic
327
+ ```
328
+
329
+ <!-- sevro-example:recipe-semantic-fail -->
330
+
331
+ ```sh
332
+ bun "$SEVRO_RECIPES/run.ts" semantic deterministic --fail
333
+ ```
334
+
335
+ The protocol judge derives pass/fail from the actual candidate-response field
336
+ using an exact fixture oracle. It is not a model and does not establish
337
+ qualitative judgment quality. The negative response gives the wrong command
338
+ and port; semantic grading completes with a failing proposition.
339
+
340
+ For an actual model candidate and judge, set the native variables above and
341
+ export `SEVRO_RECIPE_JUDGE_MODEL` to an available Codex judge model:
342
+
343
+ ```sh
344
+ bun "$SEVRO_RECIPES/run.ts" semantic codex --dry
345
+ bun "$SEVRO_RECIPES/run.ts" semantic codex
346
+ ```
347
+
348
+ `semantic claude` selects a Claude candidate with a separate Codex judge;
349
+ it needs both CLIs and the Codex auth path. A correct response is expected to
350
+ pass; add `--fail` for the deliberately wrong-response task and an expected
351
+ failed verdict. Live verdicts remain observations, not guarantees.
352
+
353
+ This response-only recipe makes one candidate model call and one additional
354
+ judge call per completed trial. The judge receives all its propositions in an
355
+ empty temporary workspace. Separate document sources can add further calls;
356
+ missing candidate output can avoid a judge call. Judge usage and raw structured
357
+ verdicts are retained separately. A malformed or incomplete judge response is
358
+ a grading error, not a failed proposition or a passing task. Read
359
+ [semantic grading](builtin-graders-v1.md) before adapting its oracle.
360
+
361
+ ## Run the complete extension lifecycle
362
+
363
+ Files: [extension.ts](../examples/recipes/extension.ts),
364
+ [methods](../examples/recipes/extension-methods.ts), and
365
+ [artifact preparation](../examples/recipes/extension-artifacts.ts). Prerequisites:
366
+ Bun, Git and the platform's shell isolation tool. No model is required:
367
+
368
+ <!-- sevro-example:recipe-lifecycle-pass -->
369
+
370
+ ```sh
371
+ bun "$SEVRO_RECIPES/run.ts" lifecycle deterministic
372
+ ```
373
+
374
+ `describe` advertises version/capabilities/grader; `resolve` returns the task
375
+ and committed fixture; `prepare` supplies hashed Git-excluded `startup.txt`;
376
+ the candidate runs; an isolated built-in check reads the mounted bytes; then
377
+ `evaluate` checks the complete final-message evidence for port `3000` and cites
378
+ that observation. The default task policy combines these checks. Evidence is
379
+ saved before cleanup. Every extension method runs in a fresh process, so prior
380
+ process globals are not state. Stdout contains only its matching protocol
381
+ response; diagnostics belong on stderr.
382
+
383
+ <!-- sevro-example:recipe-lifecycle-fail -->
384
+
385
+ ```sh
386
+ bun "$SEVRO_RECIPES/run.ts" lifecycle deterministic --fail
387
+ ```
388
+
389
+ The wrong final answer fails the built-in output assertion and extension check,
390
+ while preparation's shell check still passes. The extension cannot turn missing
391
+ evidence or a failed exchange into success. Inspect the saved argv command and
392
+ source closure, including its skill resources, to adapt it into your own
393
+ [trusted extension](extension-protocol-v1.md).
394
+
395
+ ## Pair plugins, goals, and hooks with preparation
396
+
397
+ Files: the same extension and artifact builder, plus
398
+ [goals runtime](../examples/recipes/runtime/goals.json) and
399
+ [selected-plugin runtime](../examples/recipes/runtime/plugins.json).
400
+ Prerequisites: a native CLI with plugin and native-goal support; use the
401
+ [checked host versions](typescript-quality.md#environment-and-ci). The plugin
402
+ manifests, skill and SessionStart command hook are all prepared artifacts, not
403
+ an undeclared global installation. The Codex package uses a local marketplace;
404
+ Claude uses declared plugin directories. The extension explicitly invokes the
405
+ prepared `startup:startup-guide` skill.
406
+
407
+ First add only native goals to the empty runtime and validate preparation:
408
+
409
+ <!-- sevro-example:recipe-goals-codex-dry -->
410
+
411
+ ```sh
412
+ bun "$SEVRO_RECIPES/run.ts" plugins codex --dry --goals-only
413
+ ```
414
+
415
+ <!-- sevro-example:recipe-goals-claude-dry -->
416
+
417
+ ```sh
418
+ bun "$SEVRO_RECIPES/run.ts" plugins claude --dry --goals-only
419
+ ```
420
+
421
+ Then add `hooks.plugins: ["startup"]` so only this prepared plugin's command
422
+ handlers are authorized. Codex selects app-server for its native goal route;
423
+ Claude uses plugin-only settings, so do not add `--claude-project-settings`:
424
+
425
+ <!-- sevro-example:recipe-plugins-codex-dry -->
426
+
427
+ ```sh
428
+ bun "$SEVRO_RECIPES/run.ts" plugins codex --dry
429
+ ```
430
+
431
+ <!-- sevro-example:recipe-plugins-claude-dry -->
432
+
433
+ ```sh
434
+ bun "$SEVRO_RECIPES/run.ts" plugins claude --dry
435
+ ```
436
+
437
+ All four dry commands expect `not_run`/`not_requested`/`not_assessed`, exit `0`.
438
+ They validate preparation and retain its actual hashed files. They do not
439
+ install a plugin into a live native host, execute its hook, or observe a goal.
440
+ `--goals-only` is deliberately a preparation step; the final recipe's hook
441
+ assertion requires the subsequent full policy.
442
+
443
+ With the native model/credentials configured, remove `--dry` from the full
444
+ plugin command. Expect `passed`, exit `0`: the selected SessionStart hook
445
+ writes `hook-ran.txt`, an isolated shell assertion reads `hook ran`, and the
446
+ skill answer supplies the startup command/port. The hook runs credential-free
447
+ with network denied and only the prepared plugin subtree readable.
448
+ `hooks.nativeGoal` enables the native goal facility; inspect retained
449
+ `sevro.host.native-goal` observations for actual creation/status. Enabling the
450
+ facility or passing this startup task alone does not prove goal completion.
451
+
452
+ ```sh
453
+ bun "$SEVRO_RECIPES/run.ts" plugins codex
454
+ bun "$SEVRO_RECIPES/run.ts" plugins codex --fail
455
+ ```
456
+
457
+ Or, with the Claude model/credential route configured:
458
+
459
+ ```sh
460
+ bun "$SEVRO_RECIPES/run.ts" plugins claude
461
+ bun "$SEVRO_RECIPES/run.ts" plugins claude --fail
462
+ ```
463
+
464
+ For a deliberate failure, run that live command with `--fail`; the requested
465
+ wrong response should fail the answer checks while the hook assertion passes.
466
+ Removing `startup` from the runtime's allowed plugins is a separate diagnostic:
467
+ the command hook is filtered and the hook-file assertion fails. Native/model
468
+ behavior must be observed before claiming either live outcome.
469
+
470
+ ## What tutorial verification proves
471
+
472
+ `bun run test:docs-examples` packs this candidate, copies the packaged recipe
473
+ project to a fresh consumer directory, and executes every marked deterministic
474
+ positive/negative command. It runs real isolated `rg`, Node, UV/Python and
475
+ mise-selected Node checks, the hidden arithmetic test, semantic protocol
476
+ control, and the entire extension lifecycle. Missing UV, Python, mise or its
477
+ declared Node installation fails with an actionable prerequisite error; no
478
+ recipe is silently skipped. CI provisions these tools explicitly.
479
+
480
+ The verifier also dry-prepares every recipe with both native hosts, including
481
+ both skill/plugin variants, negative-control inputs and the goals-only step,
482
+ and verifies retained artifact digests. These are not authenticated model,
483
+ goal, plugin-installation or hook-execution trials. Run the live commands to
484
+ measure those routes. The separate published-consumer check executes the
485
+ installed-package tutorial using the exact current version and license metadata.
package/docs/releases.md CHANGED
@@ -53,7 +53,8 @@ with their own CI before starting the release.
53
53
  `main`, permitting only version/distribution-tag changes and the exact
54
54
  release documentation and workflow files inventoried in
55
55
  [the CI selector](../.github/scripts/release-ci.py). All other tracked inputs
56
- must match. The original run must have completed the full quality gate;
56
+ must match. The original run must have completed all four quality phases
57
+ and their gate steps, or the historical complete quality gate;
57
58
  another release's reused status is insufficient. CI retains the source SHA
58
59
  and run URL in `release-ci.json`. Missing evidence fails the release check;
59
60
  it does not trigger another test run. Ordinary code changes and explicit
package/docs/report-v1.md CHANGED
@@ -3,10 +3,14 @@
3
3
  `sevro report` reads one or more retained `sevro.cli-result.v1` files and their
4
4
  referenced `sevro.run-evidence.v1` files. It validates both public schemas and
5
5
  checks run identity, exit category, case count, and trial references before
6
- reporting. Paths must be absolute and distinct.
6
+ reporting. Programmatic `createReport` paths must be absolute and distinct.
7
+ CLI `--result-file` paths may be relative to the invoking directory; they are
8
+ canonicalized before duplicate detection and loading.
7
9
 
8
10
  ```sh
9
11
  sevro report --result-file /absolute/path/to/result.json
12
+ sevro report --latest
13
+ sevro report --latest --results-root ./other-results
10
14
  sevro report --json --result-file /absolute/path/to/first.json \
11
15
  --result-file /absolute/path/to/second.json
12
16
  ```
@@ -17,6 +21,14 @@ inputs return exit 64 with a diagnostic on stderr. Reporting does not change
17
21
  the exit category of any input run; each row retains its original code.
18
22
  Pre-run failures with no case rows remain visible in the input-run section.
19
23
 
24
+ `--latest` selects
25
+ `<cwd>/.sevro/results/latest.json`; `--results-root` changes that root and requires
26
+ `--latest`. It is exclusive with `--result-file`. Each retained CLI evaluation
27
+ saves a `result.json` beside its run evidence and atomically updates latest,
28
+ including dry and failed runs. Pre-run failures do not replace latest. Missing
29
+ latest or referenced evidence is an error. See
30
+ [the evaluation workflow](evaluation-workflow.md).
31
+
20
32
  Each case row keeps task verdict, execution, and grading separate. Task pass
21
33
  rate is measured only when every trial completed execution and grading with an
22
34
  assessed task verdict. Candidate duration sums the measured host call time
@@ -9,6 +9,17 @@ Each domain outcome also gets one human-readable line with its case, trial,
9
9
  outcome ID, and status. Domain outcomes remain independent of the task verdict
10
10
  and exit code.
11
11
 
12
+ The CLI also shows trial states, bounded failed/unavailable
13
+ check details, measured candidate duration and known/unknown usage in human
14
+ completion. Actual preparation/candidate/grading/evidence stage messages use
15
+ stderr in both modes; they do not assert task success. Dry execution/grading are
16
+ explicitly skipped. JSON stdout stays unchanged. The CLI saves `result.json`
17
+ beside retained run evidence and atomically publishes `<results-root>/latest.json`
18
+ for [report access](report-v1.md). These output files stay inside excluded storage
19
+ and do not change evaluation identity. A failure to retain CLI/latest output is
20
+ reported as an internal error after an otherwise successful run; an earlier
21
+ nonzero run outcome keeps its precedence and its evidence reference.
22
+
12
23
  ## Separate states
13
24
 
14
25
  Each trial and aggregate result carries:
@@ -98,6 +109,17 @@ persistence error.
98
109
  [`identity-v1.md`](identity-v1.md) defines the canonical digest and each
99
110
  comparison dimension.
100
111
 
112
+ Current CLI runs additionally retain the redacted effective-settings preview as
113
+ optional `configuration.resolved` (`sevro.resolved-run-settings.v1`), including
114
+ saved-setting selections and resolved operational paths. This snapshot excludes
115
+ credentials, credential-option paths, private source-closure/mapping paths,
116
+ private extension configuration and runtime
117
+ environment values; it is outside `configuration.digest`. Assessment settings
118
+ remain bound by the existing identity inputs and `configuration.redacted`.
119
+ Historical evidence without this optional field remains valid; missing settings
120
+ stay unknown. See [saved run settings](run-settings-v1.md) for precedence and
121
+ privacy limits.
122
+
101
123
  The versioned machine-readable contracts are
102
124
  [`cli-result-v1.schema.json`](../schemas/cli-result-v1.schema.json) and
103
125
  [`run-evidence-v1.schema.json`](../schemas/run-evidence-v1.schema.json). A