orizu 0.5.25 → 0.5.26

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.
@@ -23,7 +23,7 @@ arrive with:
23
23
  - multiply labeled rows for measuring human–human agreement.
24
24
 
25
25
  If the labels are Likert scores or an “overall quality” bundle, return to the
26
- **J4 — Ground truth via annotation (conditional)** and rewrite the rubric as one binary question
26
+ First win's conditional ground-truth annotation stage and rewrite the rubric as one binary question
27
27
  per failure mode before building a judge.
28
28
 
29
29
  - A **judge** is the evaluator, often an LLM instruction set plus a runner.
@@ -58,7 +58,7 @@ rows or overall agreement. Judge–human kappa should normally land within about
58
58
  0.05–0.10 of human–human kappa.
59
59
 
60
60
  When human–human kappa is itself low (below ~0.6), the rubric or labels are the
61
- bottleneck. Return to **J4 — Ground truth via annotation (conditional)**: clarify the
61
+ bottleneck. Return to First win's conditional ground-truth annotation stage: clarify the
62
62
  failure-mode definition, add boundary examples, repair the labeler workflow, and
63
63
  relabel a shared sample. Recompute the human ceiling before changing judge
64
64
  instructions. Judge tuning against disputed labels only automates the dispute.
@@ -112,7 +112,7 @@ assertion, such as schema validation when schema validity is the entire failure
112
112
  definition, does not need prompt tuning or model-selection statistics. Record
113
113
  why the assertion is identical to the human-approved rule. If it is gating, it
114
114
  still needs an agreed judge trust bar and the registered, submitted evidence path from
115
- **J5 — Build & validate judges**. A regex, keyword, or other heuristic is not
115
+ First win's judge-validation stage. A regex, keyword, or other heuristic is not
116
116
  tautological merely because it is code; validate it against the human labels
117
117
  like any other judge.
118
118
 
@@ -207,11 +207,10 @@ that as overfitting and return to a new development cycle rather than iterating
207
207
  on judge-test rows.
208
208
 
209
209
  The application final-held-out partition reserved for the single
210
- seed-versus-selected comparison in the dataset-design reference (J3) never
210
+ seed-versus-selected comparison in the dataset-design reference never
211
211
  appears in judge train, judge dev, judge test, or any other judge-alignment
212
212
  material. A judge selected for agreement on those rows would bias the final
213
- comparison through the judge itself. Those rows need no human labels. At the
214
- **J6 — Optimize & promote**, the accepted judge scores the application
213
+ comparison through the judge itself. Those rows need no human labels. During Promote's final comparison, the accepted judge scores the application
215
214
  final-held-out rows exactly once for that comparison; this application scoring
216
215
  is not judge-alignment measurement or tuning.
217
216
 
@@ -243,10 +242,10 @@ evals/<project>/
243
242
  In a local workflow under the user's token, push the executable artifacts and
244
243
  register both the row scorer used for per-example feedback and the set scorer
245
244
  used for kappa plus confusion diagnostics. Hosted sessions follow the artifact
246
- authority and commit rules in `SKILL.md`. Substitute IDs returned by each
245
+ authority and commit rules in `authority-map.md`. Substitute IDs returned by each
247
246
  command in subsequent commands:
248
247
 
249
- For a custom deterministic code assertion that must complete the submitted J5
248
+ For a custom deterministic code assertion that must complete the submitted judge-validation
250
249
  evidence path, use the executable `prompt_runner` control-plane shape. The
251
250
  runner implements the assertion without calling an LLM; the judge artifact is
252
251
  its versioned execution contract and output-schema identity. A `runner_only`
@@ -290,7 +289,7 @@ orizu scorers register --project <team/project> --name <kappa-scorer-name> --man
290
289
 
291
290
  For the LLM judge-test split, execute the row scorer, submit its row results,
292
291
  and then execute the dependent set scorer. `scorers exec` submits the aggregate
293
- score run by default, so omit `--no-submit` at the J5 — Build & validate judges
292
+ score run by default, so omit `--no-submit` at the First win judge-validation
294
293
  boundary. See `prompt-control-plane.md` for the canonical submission behavior:
295
294
 
296
295
  ```bash
@@ -315,7 +314,7 @@ for acceptance:
315
314
  orizu scores accept <score-run-id> --project <team/project> --json
316
315
  ```
317
316
 
318
- J5 — Build & validate judges is complete only when every gating judge clears its
317
+ First win's judge-validation stage is complete only when every gating judge clears its
319
318
  agreed judge trust bar, the scorer versions are registered, `runners exec`, `scores submit`,
320
319
  and the measured `scorers exec` run have all succeeded, and the human curator has
321
320
  accepted that score run. Gate decisions only on accepted evidence. A locally
@@ -341,14 +340,14 @@ decision with the human label and returns per-row feedback for reflection.
341
340
 
342
341
  Materialize those components in `orizu.instruction-set.json` before GEPA. Create
343
342
  the stable instruction set once, or push a revised seed for a later optimization
344
- cycle. `SKILL.md` is authoritative for who runs each mutation; hosted sessions
343
+ cycle. `authority-map.md` is authoritative for who runs each mutation; hosted sessions
345
344
  prepare the manifest and exact human handoff:
346
345
 
347
346
  ```bash
348
- # Local surface (agent-allowed under the user's token): see the SKILL.md authority map.
347
+ # Local surface (agent-allowed under the user's token): see `authority-map.md`.
349
348
  orizu instructions create ./evals/<project>/judges/<failure-mode>/orizu.instruction-set.json --project <team/project> --model-config <provider/model> --json
350
349
 
351
- # Local surface (agent-allowed under the user's token): see the SKILL.md authority map.
350
+ # Local surface (agent-allowed under the user's token): see `authority-map.md`.
352
351
  orizu instructions push ./evals/<project>/judges/<failure-mode>/orizu.instruction-set.json --project <team/project> --set <judge-instruction-set> --json
353
352
  ```
354
353
 
@@ -430,7 +429,7 @@ Only after parity holds, publish fresh instruction and judge versions before
430
429
  touching judge-test. Under the user's token, the local sequence is:
431
430
 
432
431
  ```bash
433
- # Local surface (agent-allowed under the user's token): see the SKILL.md authority map.
432
+ # Local surface (agent-allowed under the user's token): see `authority-map.md`.
434
433
  orizu instructions push ./evals/<project>/judges/<failure-mode>/orizu.instruction-set.json --project <team/project> --set <judge-instruction-set> --json
435
434
 
436
435
  orizu judges push ./evals/<project>/judges/<failure-mode>/judge --project <team/project> --runner-version <materialized-judge-runner-version-id> --json
@@ -464,7 +463,7 @@ submitted judge-test commands above deliberately use `<new-judge-version-id>`.
464
463
  Require human acceptance and gatekeeper-grade judge-test validation for any ship
465
464
  or promotion decision even when the judge used for reflection met only the
466
465
  optimization-signal judge trust bar. Hosted sessions commit the accepted component map and
467
- follow the handoff boundary in `SKILL.md`.
466
+ follow the handoff boundary in `authority-map.md`.
468
467
 
469
468
  The default GEPA scorer contract supplies a GEPA-shaped row containing
470
469
  `source_row`, `candidate_id`, and `candidate_output`. If reusing a scorer runner
@@ -487,7 +486,7 @@ in `prompt-control-plane.md` before choosing either contract.
487
486
  - [ ] Development rows were used for iteration and judge-test was used only
488
487
  after the candidate was frozen.
489
488
  - [ ] The application final-held-out partition was excluded from all judge
490
- material and is reserved for one accepted-judge scoring pass at J6.
489
+ material and is reserved for one accepted-judge scoring pass during Promote.
491
490
  - [ ] The versioned judge and runners are stored; row and set scorers are
492
491
  registered.
493
492
  - [ ] `runners exec` evidence was submitted with `scores submit`, and a measured
@@ -80,7 +80,7 @@ orizu projects create --name "Quality Eval" --team my-team
80
80
 
81
81
  ### Instruction sets
82
82
 
83
- Follow the [Authority map](../SKILL.md#authority-map) for the executor on the current surface.
83
+ Follow the [Authority map](authority-map.md) for the executor on the current surface.
84
84
 
85
85
  ```bash
86
86
  orizu instructions list --project my-team/quality-eval [--status active|archived|all] [--json]
@@ -105,7 +105,7 @@ should not teach it. A set can be addressed by its stable slug or exact name;
105
105
  the slug does not change when the display name changes. `list` returns each
106
106
  instruction set and its ordered shape. `show` returns the default and every
107
107
  model-config profile's production state. Use `--status archived` or `--status
108
- all` to include archived sets. The [Authority map](../SKILL.md#authority-map) selects the
108
+ all` to include archived sets. The [Authority map](authority-map.md) selects the
109
109
  executor for each surface. Archive and restore change visibility only:
110
110
  archived sets continue to resolve and sync. `create` and `push` read a local
111
111
  manifest; JSON output is one document per line. `push --set` updates the named
@@ -115,7 +115,7 @@ or slug-addressed set independently of the manifest's display name.
115
115
  changing its production resolution. `profiles promote` moves that profile to a
116
116
  version, and `profiles rollback` creates a new version copied from `--to`,
117
117
  including that target version's settings version, before moving production.
118
- `SKILL.md` supplies the promotion-decision and execution hand-off. For a
118
+ `authority-map.md` supplies the promotion-decision execution hand-off. For a
119
119
  single-component set that wraps a prompt, only default-profile promote and rollback also move the wrapped
120
120
  prompt's production label in the same transaction and print `default profile →
121
121
  prompt label`. This coupling is one-way: moving the prompt label directly does
@@ -262,7 +262,7 @@ Delete dataset:
262
262
  - There is no non-interactive confirmation flag.
263
263
 
264
264
  Edit rows requirements:
265
- - `--file` rows must include canonical `id` for each row being updated.
265
+ - Every `--file` row must carry a non-empty string `id`.
266
266
 
267
267
  ### Tasks
268
268
 
@@ -369,6 +369,14 @@ Defaults:
369
369
  - format defaults to `jsonl`
370
370
  - output file defaults to `<taskId>.<format>`
371
371
 
372
+ Complete:
373
+
374
+ ```bash
375
+ orizu tasks complete --task <taskId>
376
+ ```
377
+
378
+ Mark an active or paused task completed only after its required response-bearing export has been verified. Completion does not publish the task report; use the Report commands above after completion.
379
+
372
380
  ### Instruction Control Plane
373
381
 
374
382
  For instruction sets, judges, runners, run submission, optimizer artifacts,
@@ -483,6 +491,7 @@ Use these shortcuts only in TTY environments where prompts can run.
483
491
 
484
492
  ## Notes and Limits
485
493
 
494
+ - `--json` may appear before or after a command. Non-streaming commands emit one JSON document, with long-running summaries on the final stdout line; streaming `orizu run tail --json` instead emits JSONL, one event object per line.
486
495
  - `tasks create` creates a draft by default, does not require `--assignees`, and pins the app's current version when the task is created.
487
496
  - `tasks create --publish --assignees <...>` intentionally creates and ships immediately.
488
497
  - `--assignees` and assignment-file rows accept member emails or user IDs. Email selectors resolve to canonical member IDs within the task's project team; ambiguous or unknown emails are rejected.
@@ -491,9 +500,9 @@ Use these shortcuts only in TTY environments where prompts can run.
491
500
  - Assignment completion payloads are validated against the pinned app-version `output_json_schema`.
492
501
  - `datasets delete-rows` requires `--row-ids`.
493
502
  - `datasets delete` requires interactive terminal confirmation and has no non-interactive confirmation flag.
494
- - `datasets edit-rows` requires row objects in `--file` to include canonical `id`.
503
+ - `datasets edit-rows --file` requires every row to carry a non-empty string `id`.
495
504
  - `--row-ids` is the canonical row selection for delete operations.
496
- - Locked datasets reject append/edit/delete row mutations.
505
+ - Locked datasets reject append/edit/delete row mutations, but whole-dataset deletion does not check the lock.
497
506
  - Row deletes are rejected when targeted rows are assignment-referenced.
498
507
  - Login callback binding defaults to `127.0.0.1:43123`. If that port is unavailable, set `ORIZU_AUTH_PORT` to an available port from 1024–65535.
499
508
  - New CLI logins use personal access tokens rather than short-lived Supabase session credentials.
@@ -1,6 +1,6 @@
1
1
  # Dataset design
2
2
 
3
- Use this reference for **J3 — Build the dataset** after the improvement plan is ratified and before annotation or judge work. Treat the plan's approved source choice and named scenario classes as input constraints rather than reopening them while moving data.
3
+ Use this reference during First win's dataset-curation stage after the improvement plan is ratified and before annotation or judge work. Treat the plan's approved source choice and named scenario classes as input constraints rather than reopening them while moving data.
4
4
 
5
5
  ## Carry the approved source choice into the dataset
6
6
 
@@ -8,6 +8,16 @@ Inventory each approved source and record its owner, row shape, time range, scen
8
8
 
9
9
  If there is no approved golden data, continue with representative production traces, a random sample, and structured synthetic cases for scenario classes that real traces do not cover. Keep provenance on every row so later versions can be audited, and have the human ratify the source choice and spot-check examples before the dataset is used.
10
10
 
11
+ ## Getting data in
12
+
13
+ Use agent glue to move data from each ratified source into Orizu:
14
+
15
+ 1. **Pull from the source.** Use the source provider's own CLI or API to export the approved rows. Follow that source's authentication and pagination contract, and preserve its stable locator and provenance without teaching a provider-specific path here.
16
+ 2. **Normalize locally.** Transform the export into CSV, JSON, or JSONL with stable row IDs and the fields required by the ratified plan. Validate row shape and provenance before sending the file to Orizu.
17
+ 3. **Load into Orizu.** Use `orizu datasets upload` for an initial dataset, or use `orizu datasets push <path>` as the path-first, automation-friendly alternative for creating an initial dataset from a CSV, JSON, or JSONL file. Use `orizu datasets append` for approved additional rows. Then follow the version and split procedure below; loading rows does not waive its coverage or review gates.
18
+
19
+ We deliberately do not build per-provider connectors while this agent-glue method covers the need. Revisit that decision only when an approved source cannot be reached by an agent-driven pull, such as streaming-only telemetry or push-based webhooks.
20
+
11
21
  ## Build a diverse sample and make coverage visible
12
22
 
13
23
  Create a coverage table from the ratified plan before sampling. Give every scenario class a planned row count, source, ground-truth status, and actual row count. Preserve the production distribution with a random sample, then deliberately add rare, costly, new, and previously failing cases. Keep successful cases as controls. Deduplicate repeated traces and keep stable row IDs; do not let one conversation or near-duplicate appear on both sides of the split.
@@ -18,7 +28,7 @@ Before upload, fail the coverage check if any scenario class from the plan has z
18
28
 
19
29
  Build one predefined split with exactly three application partitions for the primary dataset at dataset-build time: train, validation, and final-held-out. Auxiliary partitions, such as a migration-only parity corpus, may coexist in specialized workflows without changing this three-partition application doctrine. Validation is the valset that ranks candidates during optimization. Apply the Vocabulary contract to final-held-out: exclude its rows from candidate ranking, selection, reflection, and judge development.
20
30
 
21
- **Judge-development data (J5)** comes from the labeled export, and `references/building-judges.md` owns its split mechanics; exclude final-held-out rows from all judge-development material (judge-dev and judge-test/alignment) because judge selection on final-held-out labels biases the final comparison through the judge itself.
31
+ **Judge-development data** comes from the labeled export, and `references/building-judges.md` owns its split mechanics; exclude final-held-out rows from all judge-development material (judge-dev and judge-test/alignment) because judge selection on final-held-out labels biases the final comparison through the judge itself.
22
32
 
23
33
  Final-held-out rows need no human labels; exclude their row IDs from annotation tasks.
24
34
 
@@ -30,7 +40,7 @@ Budget this together with the valset. With the skilled/custom proposer, the engi
30
40
 
31
41
  No budget dry-run exists, so calculate the resolved metric-call limit before launching a skilled/custom proposer. Explicit `--max-metric-calls n` resolves to `n`; `--max-full-evals f` resolves to `f * (len(trainset) + len(valset))`; and named/default `--budget` presets resolve through the formula in `packages/orizu-gepa-python/src/orizu_gepa/optimizer.py:361-405` using the chosen preset, component count, and valset size. Require `resolved_metric_calls - len(valset) >= b`; otherwise increase or change the budget, or record that the coverage guarantee does not hold. If the available rows or optimization budget cannot support the computed size, add rows, combine only genuinely equivalent scenario classes with human approval, or record that the plan is not ready for optimization.
32
42
 
33
- The canonical split-file schema and version/split command contract live in `references/prompt-control-plane.md` under “Dataset Versions And Splits.” J3 adds the coverage requirement: use a predefined three-way split when scenario-class coverage matters, and build its partitions from the independently reviewed coverage table rather than a random split that could omit a class. For example:
43
+ The canonical split-file schema and version/split command contract live in `references/prompt-control-plane.md` under “Dataset Versions And Splits.” First win's dataset-curation stage adds the coverage requirement: use a predefined three-way split when scenario-class coverage matters, and build its partitions from the independently reviewed coverage table rather than a random split that could omit a class. For example:
34
44
 
35
45
  ```json
36
46
  {
@@ -67,7 +77,7 @@ The dataset version freezes its rows. Server-side split membership is mutable, b
67
77
 
68
78
  ## Guard live rows before annotation and version later data
69
79
 
70
- Use the dataset mutation contract in `SKILL.md` under “Execution facts” rather than inferring lock or row-edit semantics here.
80
+ Use the dataset mutation contract in `cli-reference.md` rather than inferring lock or row-edit semantics here.
71
81
 
72
82
  After source approval and the split audit, the dataset must be locked before annotation starts because tasks pin live dataset rows rather than the immutable version:
73
83
 
@@ -90,11 +100,11 @@ Never rewrite a prior version to make later labels or corrections appear histori
90
100
 
91
101
  ## Exit criterion
92
102
 
93
- J3 exits only when the evidence records all of the following:
103
+ Dataset curation exits only when the evidence records all of the following:
94
104
 
95
105
  - the human-ratified source choice and spot-check;
96
106
  - the plan's complete scenario-class list, with nonzero total, training, validation, and final-held-out counts for every scenario class;
97
107
  - an immutable dataset version ID plus the reviewed local split file and recorded split-set ID whose predefined train, validation, and final-held-out rows match that coverage table;
98
- - final-held-out row IDs excluded from all judge-development material (judge-dev and judge-test/alignment) and reserved for the final J6 comparison;
108
+ - final-held-out row IDs excluded from all judge-development material (judge-dev and judge-test/alignment) and reserved for Promote's final comparison;
99
109
  - for the annotation path, proof that the dataset was locked before any task was created; and
100
110
  - either approved golden ground truth with annotation skipped or reduced, or rows ready for the eval-strategy and annotation path.
@@ -1,26 +1,34 @@
1
1
  # Eval strategy and labeler validation
2
2
 
3
- Use this reference only after **J3 — Build the dataset** has versioned the PRIMARY dataset and created its three-way split set. If approved golden data already supplies all required ground truth, record the source, approval, and scenario-class coverage, then skip annotation. If only unresolved rows need labels, clone or filter those rows into a separate dataset because automatic assignments cover every current dataset row and explicit assignment files require uniform whole-dataset coverage.
3
+ Use this reference only after the current flow has versioned the PRIMARY dataset and created its three-way split set. If approved golden data already supplies all required ground truth, record the source, approval, and scenario-class coverage, then skip annotation. If only unresolved rows need labels, clone or filter those rows into a separate dataset because automatic assignments cover every current dataset row and explicit assignment files require uniform whole-dataset coverage.
4
4
 
5
5
  Final-held-out rows need no human labels; exclude their row IDs from annotation tasks and from the unresolved-rows clone/filter.
6
6
 
7
7
  A derived unresolved-rows dataset is a labeling vehicle, not an optimization dataset. Preserve each source row's canonical `id` field from `datasets download` in the derived row's `row_data`; this is the stable identifier used by split files. Before creating any task, create and record the derived dataset's immutable version ID and lock the live dataset; it does not need its own per-class three-way split. Task creation waits for both records.
8
8
 
9
+ ## Annotation artifact map
10
+
11
+ When ground truth requires human labels, keep the three artifacts and their owners distinct:
12
+
13
+ 1. **Strategy:** ratify the eval strategy in this reference before building a labeler or task.
14
+ 2. **App:** author and validate the app through the [app reference](building-apps.md). An app renders one row and returns its structured response; it does not own assignments or the labeling round.
15
+ 3. **Task:** create the task draft only after the app feedback gate passes. A task binds the pinned app version to dataset rows and assignments. Follow the [CLI reference](cli-reference.md) for task create, draft-URL approval, publish, assignment, status, export, and completion commands; return here for response-completeness proof and the annotation exit criterion.
16
+
9
17
  ## Guide the eval-strategy conversation
10
18
 
11
- Start from the ratified improvement plan and J3 coverage table; do not ask the human to restate facts already recorded. Walk through the decisions below with concrete rows, propose a draft answer where the evidence supports one, and ask the human to correct or ratify it.
19
+ Start from the ratified improvement plan and dataset coverage table; do not ask the human to restate facts already recorded. Walk through the decisions below with concrete rows, propose a draft answer where the evidence supports one, and ask the human to correct or ratify it.
12
20
 
13
21
  1. **Experience and decision.** Ask which exact user experience the eval represents and which change or release decision it must inform. Confirm the unit being judged: one response, conversation, agent step, or complete run.
14
22
  2. **Good and bad by scenario class.** For every scenario class, show representative rows and draft one binary question per observed failure mode. Ask what visible evidence makes each answer pass, fail, or unlabelable. Do not bundle independent judgments or replace them with a Likert question.
15
- 3. **Eval-set composition.** Confirm which versioned rows need human labels, the intended counts per scenario class, and any rare cases that must be present even when production frequency is low. Keep J3 validation for candidate ranking and keep its final-held-out partition under the separate partition doctrine in `references/dataset-design.md`.
23
+ 3. **Eval-set composition.** Confirm which versioned rows need human labels, the intended counts per scenario class, and any rare cases that must be present even when production frequency is low. Keep First win's validation partition for candidate ranking and keep its final-held-out partition under the separate partition doctrine in `references/dataset-design.md`.
16
24
  4. **Ground truth.** Ask who is qualified to label each question, what context they need, how ambiguity or disagreement will be adjudicated, and whether user behavior or another approved golden-data field already answers it. Import approved golden data instead of relabeling it.
17
- 5. **Downstream validation.** Explain that these labels will later validate automated judges. Ask which decision class each judge will power and record it for **J5 — Build & validate judges**, where the human sets the numerical judge trust bar from measured agreement, TPR, and TNR rather than accepting a default here.
25
+ 5. **Downstream validation.** Explain that these labels will later validate automated judges. Ask which decision class each judge will power and record it for First win's judge-validation stage, where the human sets the numerical judge trust bar from measured agreement, TPR, and TNR rather than accepting a default here.
18
26
 
19
27
  Persist the ratified eval strategy in project context. It must name the experience and unit, dataset version and split set, scenario classes and row counts, binary questions with pass/fail/unlabelable rules, ground-truth source, labeler qualifications, disagreement path, golden-data decision, and the future decision attached to each judge trust bar. Do not author the labeler until the human ratifies this record.
20
28
 
21
- `references/building-judges.md` owns the J5 input envelope and is being aligned there. This reference records the evidence handed to that contract. For a golden-data-only path, validate the field mapping against the binary questions, spot-check every scenario class with the human, and record the PRIMARY versioned dataset ID plus the approved ground-truth field per failure mode in the plan and report; then skip the remaining J4 annotation path.
29
+ `references/building-judges.md` owns the judge-validation input envelope and is being aligned there. This reference records the evidence handed to that contract. For a golden-data-only path, validate the field mapping against the binary questions, spot-check every scenario class with the human, and record the PRIMARY versioned dataset ID plus the approved ground-truth field per failure mode in the plan and report; then skip the remaining annotation path.
22
30
 
23
- For a mixed path, after annotation export, group derived records by the canonical `id` at `dataset_row.row_data.id`, the same identifier emitted by `datasets download` and used by split files, and require each key to match one primary row. Preserve every per-rater record in each row group, including the rater identity from the export, then aggregate according to the eval strategy's agreement rules. Record J5's labeled input as the union of the golden field mapping for golden rows and the grouped task export for annotated rows, keyed by that canonical primary-row `id`. Continue below only for questions or rows whose ground truth still requires human labels.
31
+ For a mixed path, after annotation export, group derived records by the canonical `id` at `dataset_row.row_data.id`, the same identifier emitted by `datasets download` and used by split files, and require each key to match one primary row. Preserve every per-rater record in each row group, including the rater identity from the export, then aggregate according to the eval strategy's agreement rules. Record the judge-validation stage's labeled input as the union of the golden field mapping for golden rows and the grouped task export for annotated rows, keyed by that canonical primary-row `id`. Continue below only for questions or rows whose ground truth still requires human labels.
24
32
 
25
33
  ## Validate the labeler before tasks or labels
26
34
 
@@ -30,7 +38,7 @@ Run the smoke test and preview flow from that reference with representative rows
30
38
 
31
39
  Record the rows previewed, the feedback, the revisions, and the approval. Do not create or publish a task, and do not start labeling, until this labeler-feedback gate is confirmed.
32
40
 
33
- Use the draft-first ordering, URL-approval gate, and assignee-selector contract in `SKILL.md` under “Execution facts”; use `references/cli-reference.md` for the command surface. This reference adds one versioning safeguard: the task pins the app version selected at creation.
41
+ Use the draft-first ordering, URL-approval gate, assignee-selector contract, and command surface in `cli-reference.md`. This reference adds one versioning safeguard: the task pins the app version selected at creation.
34
42
 
35
43
  If draft testing reveals a problem, revise through `orizu apps update`, repeat the preview and pointed-feedback gate, capture the returned version number `n`, and explicitly repin the draft before testing its URL again:
36
44
 
@@ -38,7 +46,7 @@ If draft testing reveals a problem, revise through `orizu apps update`, repeat t
38
46
  orizu tasks update --task <taskId> --app <appId> --version <n>
39
47
  ```
40
48
 
41
- Then return to the approval and publish sequence in “Execution facts.” If the strategy requires an explicit row-to-labeler map, it must still cover every row in this task's separate annotation dataset uniformly.
49
+ Then return to the task create, draft-URL test, approval, and publish sequence in `references/cli-reference.md` under “End-to-End Flows” → “New Team to Export”. If the strategy requires an explicit row-to-labeler map, it must still cover every row in this task's separate annotation dataset uniformly.
42
50
 
43
51
  After labeling, inspect the machine-readable status before task completion or export:
44
52
 
@@ -52,13 +60,8 @@ Verify that `task.counts.completed` equals `task.totalRequiredAssignments` and t
52
60
  orizu tasks export --task <task-id> --format jsonl --out ./labels.jsonl
53
61
  ```
54
62
 
55
- Parse every non-empty JSONL line. Require the export row count to equal `task.totalRequiredAssignments`, require each `dataset_row_id` to appear exactly `task.requiredAssignmentsPerRow` times, and require every record to carry a non-null `response_id` and `response_data`. Any mismatch means a planned row lacks a response and blocks completion. Only after this response-level proof may the task be completed and its report published:
56
-
57
- ```bash
58
- orizu tasks complete --task <task-id>
59
- orizu tasks report set --task <task-id> --report-file ./task-report.md --json
60
- ```
63
+ Parse every non-empty JSONL line. Require the export row count to equal `task.totalRequiredAssignments`, require each `dataset_row_id` to appear exactly `task.requiredAssignmentsPerRow` times, and require every record to carry a non-null `response_id` and `response_data`. Any mismatch means a planned row lacks a response and blocks completion. Only after this response-level proof may the task be completed and its report published; follow the Completion and Report commands in the [CLI reference](cli-reference.md), in that order.
61
64
 
62
65
  ## Exit criterion
63
66
 
64
- The annotation path exits only when the ratified eval strategy, labeler feedback, app approval, complete assignment-status evidence, response-complete exported labels, and published task report are recorded together. The golden-data path exits with the PRIMARY versioned dataset ID and approved per-failure-mode field mapping recorded. The mixed path additionally records the canonical-row-`id`-keyed union of golden mappings and per-rater annotated exports. In every path, report ground-truth and disagreement counts per scenario class so J5 receives auditable evidence rather than only an aggregate.
67
+ The annotation path exits only when the ratified eval strategy, labeler feedback, app approval, complete assignment-status evidence, response-complete exported labels, and published task report are recorded together. The golden-data path exits with the PRIMARY versioned dataset ID and approved per-failure-mode field mapping recorded. The mixed path additionally records the canonical-row-`id`-keyed union of golden mappings and per-rater annotated exports. In every path, report ground-truth and disagreement counts per scenario class so judge validation receives auditable evidence rather than only an aggregate.
@@ -77,12 +77,12 @@ text, then prepare a manifest such as:
77
77
  ```
78
78
 
79
79
  Commit the complete manifest and its component files, then follow the
80
- [Authority map](../SKILL.md#authority-map) for each mutation.
80
+ [Authority map](authority-map.md) for each mutation.
81
81
 
82
82
  ## Consolidation
83
83
 
84
84
  Consolidation changes ownership and visibility. Create the consolidated set
85
- through the surface selected by the [Authority map](../SKILL.md#authority-map) and inspect its complete
85
+ through the surface selected by the [Authority map](authority-map.md) and inspect its complete
86
86
  profiles before changing any pointer:
87
87
 
88
88
  ```bash
@@ -6,7 +6,7 @@ For a customer already running official GEPA from a plain script — inline
6
6
  become the set's fixed shape, and its values become that profile's components.
7
7
  Use `orizu instructions` as the only creation and update path for those
8
8
  customer-owned instructions. Prepare the complete manifest, then follow the
9
- [Authority map](../SKILL.md#authority-map) for its mutations.
9
+ [Authority map](authority-map.md) for its mutations.
10
10
 
11
11
  The ordering rule: **nothing is optimized until parity is proven.** The last
12
12
  step before `run-gepa` is always `orizu scorers verify-parity`, which runs the
@@ -33,10 +33,10 @@ orizu setup --team <team-slug> --project <project-slug>
33
33
  One dataset holds every row; require four disjoint, nonempty partitions:
34
34
  `TRAINSET`, `VALSET`, `PARITYSET`, and `FINAL_HELD_OUT`. Mirror existing
35
35
  train/validation membership exactly. Here, `parity` is a migration-only
36
- auxiliary partition, not an application partition; the canonical J3
36
+ auxiliary partition, not an application partition; the canonical dataset-design
37
37
  application doctrine remains train, validation, and final-held-out. Source and
38
38
  approve representative `PARITYSET` rows before reserving final-held-out, then
39
- reserve `FINAL_HELD_OUT` only from the remaining rows. Apply J3's coverage
39
+ reserve `FINAL_HELD_OUT` only from the remaining rows. Apply First win's dataset-coverage
40
40
  discipline:
41
41
  every named scenario class must have nonzero train, validation, and
42
42
  final-held-out counts. Stop when that coverage, ordering, or four-way
@@ -104,7 +104,7 @@ orizu --local instructions create ./orizu.instruction-set.json \
104
104
  --model-config <provider/model> --json
105
105
  ```
106
106
 
107
- The agent-created runner version is unlabeled. No standalone runner-label command exists. Following the [Authority map](../SKILL.md#authority-map), if a human accepts its exact ID as default, the human curator runs `orizu --local runners pull gepa-candidate-runner --project <team>/<project> --version <candidate-runner-version-id> --out ./candidate-runner-default-handoff`, leaves that fresh exact-version directory unchanged, then runs `orizu --local runners push ./candidate-runner-default-handoff --project <team>/<project> --name gepa-candidate-runner --label default --json`. The manifest
107
+ The agent-created runner version is unlabeled. No standalone runner-label command exists. Following the [Authority map](authority-map.md), if a human accepts its exact ID as default, the human curator runs `orizu --local runners pull gepa-candidate-runner --project <team>/<project> --version <candidate-runner-version-id> --out ./candidate-runner-default-handoff`, leaves that fresh exact-version directory unchanged, then runs `orizu --local runners push ./candidate-runner-default-handoff --project <team>/<project> --name gepa-candidate-runner --label default --json`. The manifest
108
108
  carries the set's `name`, human-readable `description`, fixed `shape`, and component values. Put each original dict
109
109
  value in a file without changing its bytes. This one-component example maps
110
110
  the old `system` key to `system.md`:
@@ -308,7 +308,7 @@ gate. Repeat the command with `--split train` and `outputs-train.jsonl`; the
308
308
  explicit `parity` command above covers the independently selected corpus.
309
309
  Require exit 0 on all three parity runs.
310
310
 
311
- Keep final-held-out untouched until J6. It is exercised exactly once, at the
311
+ Keep final-held-out untouched until Promote. It is exercised exactly once, at the
312
312
  final seed-vs-selected comparison, by the already-parity-proven scorer and
313
313
  supplies no scorer-development feedback.
314
314
 
@@ -317,6 +317,10 @@ agreed. A limited run reports `parity: false` with
317
317
  `scope: {compared, total}` and the line "Smoke check passed on N of M rows"
318
318
  — it exits 0, but it is not the proof.
319
319
 
320
+ ## Router handoff after parity
321
+
322
+ When the router sends an existing setup here, stop after all three scorer parity checks pass. Open `flows/first-win.md`; do not continue directly to section 7. First win owns the validated-judge optimization run, and `flows/promote.md` separately owns its report, validation, and human promotion decision. The remaining sections are reference detail only when the active flow explicitly reaches them.
323
+
320
324
  ## 7. Optimizer and run
321
325
 
322
326
  ```bash
@@ -361,7 +365,7 @@ reflected on each round.
361
365
  Pass `--scorer-candidate-field <field>` here too if you passed it to
362
366
  `verify-parity`: the payload the runner sees must be the one parity was proven
363
367
  under. Select one candidate on validation evidence, then reserve one final-held-out seed-versus-selected-candidate comparison for the promotion decision.
364
- Write and attach the optimization report, then obtain the human decision. Following the [Authority map](../SKILL.md#authority-map), in the simpler one-shot path a human curator runs `orizu --local optimizations promote <run-id> --candidate <candidate-id> --label production --project <team>/<project> --json` after acceptance. In the equivalent two-stage path for separate materialization, the coding agent materializes once with the unlabeled command below.
368
+ Write and attach the optimization report, then obtain the human decision. Following the [Authority map](authority-map.md), in the simpler one-shot path a human curator runs `orizu --local optimizations promote <run-id> --candidate <candidate-id> --label production --project <team>/<project> --json` after acceptance. In the equivalent two-stage path for separate materialization, the coding agent materializes once with the unlabeled command below.
365
369
 
366
370
  ```bash
367
371
  orizu --local optimizations promote <run-id> --candidate <candidate-id> \
@@ -99,7 +99,7 @@ Server events redact row snapshots and reflection prompts by default, so an expo
99
99
  ## How To Build The Report
100
100
 
101
101
  1. Confirm the seed, all candidate ids, their parent/child relationships, and their validation results. Include rejected, failed, or incomplete candidates and mark unavailable comparisons plainly; a score from one small training batch is not a substitute for a full validation score. A failed proposal that produced no child candidate id is a run event, not another candidate.
102
- 2. Map every evaluation row to a scenario class named in the improvement plan or dataset. If the logs lack a class, report that classification gap and return to dataset design; do not silently invent classes.
102
+ 2. Map every evaluation row to a scenario class named in the improvement plan or dataset. If the logs lack a class, record the classification gap and recommend **Gather more evidence**; do not silently invent a class or leave the in-progress Promote flow. Keep the gap in the decision record and complete Promote's human decision; after Promote exits, route the recorded review incident through `flows/triage.md`.
103
103
  3. Select the candidate on validation evidence. Explain why each other candidate was not selected, including any useful strength the selected candidate gives up.
104
104
  4. Diagnose optimizer health from the frontier size, proposal acceptance rate, budget state, and validation score-over-time trajectory. This is what distinguishes a plateau from a promising search stopped by its budget.
105
105
  5. Determine whether the current execution surfaces can reproduce the selected system before claiming a Final-held-out comparison. The optimization run does not execute the Final-held-out split: `run-gepa` and its logs contain only training and validation data.
@@ -127,7 +127,7 @@ Server events redact row snapshots and reflection prompts by default, so an expo
127
127
 
128
128
  Current `runners exec` cannot address an instruction-set profile version. Multi-component promotion returns a `profileVersionId` plus component statuses without the component prompt-version ids needed by that command, and one prompt-version execution cannot reproduce the complete profile. For a set-of-one instruction set, `instructions push` creates the profile version that carries the selected component value, but the optimization run does not supply that profile as its result and `runners exec` still cannot address its `profileVersionId`. Execute by component prompt-version id only when an independently confirmed association identifies that exact pushed profile and supplies its manifest, settings, and pins. Do not infer a profile through a component prompt-version id: implicit resolution can select a newer profile that shares that component. If the required exact profile context cannot be established, mark instruction-set Final-held-out execution unavailable, recommend **Gather more evidence**, and name exact profile-addressed runner execution as the required product capability. Never reuse validation rows or reopen candidate ranking with Final-held-out.
129
129
  6. Decide whether the improvement is larger than expected noise and whether any regression is unacceptable. **Run-to-run noise** means score movement caused by sampling or model variation rather than by the instruction change. The stored `confidence_interval_95` describes one system's single score run; it is not a confidence interval for the seed-to-selected change. Comparing two per-system intervals for overlap is not a significance test. Use `evaluations.jsonl` only for validation diagnostics; Final-held-out significance requires the separately generated Final-held-out comparison artifact. Sanctioned change evidence is repeated Final-held-out seed and selected runs or paired per-row differences from that Final-held-out artifact. Otherwise write “significance was not measured.” Statistical significance means the measured change is unlikely to be explained by measured chance variation alone; it does not make a tiny gain useful. The **practical threshold** is the smallest improvement the team agreed would matter; if none exists, state that no threshold was agreed and recommend agreeing one before the next run. A **scenario guardrail** is the largest decline the team agreed to accept for one scenario class.
130
- 7. Write a recommendation and named next move for every scenario that did not improve or regressed. When the move changes examples, coverage, labels, or split design, return to **J3 — Build the dataset** rather than changing instructions without measurement.
130
+ 7. Write a recommendation and named next move for every scenario that did not improve or regressed. When the move changes examples, coverage, labels, or split design, keep it as a named next move until Promote records the human decision; after Promote exits, route the recorded review incident through `flows/triage.md` rather than changing instructions without measurement or jumping into an internal First win stage.
131
131
 
132
132
  For a rate, report the change in percentage points: 72% to 81% is +9 percentage points, not +9%. If judge alignment is reported, define **Cohen's kappa** as agreement after removing the amount expected by chance. Define a **confusion matrix** as the counts of correct and incorrect decisions for each class. Define any other statistical term in one plain sentence when it first appears.
133
133
 
@@ -187,15 +187,15 @@ Group outcomes by real scenario from the improvement plan or dataset, not only b
187
187
 
188
188
  | Scenario class | Why it matters | Coverage | Seed -> selected on validation | What this class teaches | Next move and owner |
189
189
  | --- | --- | --- | --- | --- | --- |
190
- | [class] | [user/system consequence] | [training row count / validation row count] | [fixed, unchanged failures, regressions, and row ids] | [plain-language lesson] | [named action, owner, and journey step] |
190
+ | [class] | [user/system consequence] | [training row count / validation row count] | [fixed, unchanged failures, regressions, and row ids] | [plain-language lesson] | [named action, owner, and flow] |
191
191
 
192
- For each class that did not improve or regressed, choose and tailor a named move:
192
+ For each class that did not improve or regressed, choose and tailor a named move in the Promote decision record without leaving the in-progress flow. Complete Promote's human decision first; after Promote exits, route through `flows/triage.md` before executing any move below. Triage owns the eval-gap decision and any admitted transition into a complete improvement flow.
193
193
 
194
- - **Add coverage — J3 — Build the dataset:** collect or create more examples for this class, create a new dataset version, revisit split and optimizer-batch coverage, then rerun optimization.
195
- - **Repair ground truth — J3 — Build the dataset, then conditional J4 — Ground truth via annotation:** send named contested rows for human re-review, correct rationales or labels, create a new dataset version, and revalidate the judge before optimizing again.
196
- - **Improve evaluator feedback — J5 — Build & validate judges:** make the scorer explain the concrete disagreement, revalidate it, then rerun.
197
- - **Change the application — J2 — Assess & plan:** when the failure needs retrieval, tools, state, or code rather than instructions, return to the ratified improvement plan and name the engineering change.
198
- - **Guard a regression — J3 — Build the dataset:** add the regressed rows and nearby counterexamples to a new dataset version, preserve them in validation, then rerun candidate selection.
194
+ - **Add coverage — Triage:** establish the missing-coverage branch before collecting or creating more examples, creating a new dataset version, revisiting split and optimizer-batch coverage, and rerunning optimization.
195
+ - **Repair ground truth — Triage:** establish the broken-eval branch before sending named contested rows for human re-review, correcting rationales or labels, creating a new dataset version, and revalidating the judge before optimizing again.
196
+ - **Improve evaluator feedback — Triage:** establish the broken-eval branch before making the scorer explain the concrete disagreement, revalidating it, and rerunning.
197
+ - **Change the application — Triage:** establish that the failure needs retrieval, tools, state, or code rather than instructions, amend the ratified improvement plan when required, and name the engineering change.
198
+ - **Guard a regression — Triage:** establish the missing-coverage branch before adding the regressed rows and nearby counterexamples to a new dataset version, preserving them in validation, and rerunning candidate selection.
199
199
 
200
200
  ## What Changed In The Selected Version
201
201
 
@@ -224,7 +224,7 @@ This section contains exactly the seed and the candidate selected on validation;
224
224
  ## Recommendation And Named Next Moves
225
225
 
226
226
  1. **[Promote / Do not promote / Gather more evidence] — [owner]:** [Decision and reason.]
227
- 2. **[Scenario class] — [owner]:** [Specific dataset, annotation, judge, or application action; artifact to create; journey step to resume.]
227
+ 2. **[Scenario class] — [owner]:** [Specific dataset, annotation, judge, or application action; artifact to create; admitted flow to resume.]
228
228
  3. **[Post-promotion monitoring, if promoting] — [owner]:** [Metric, scenario class, sample source, review point, and rollback trigger.]
229
229
 
230
230
  - **Extend the search —** budget was binding and validation was still improving; rerun with a larger budget.
@@ -261,6 +261,6 @@ Recommend **Do not promote** when the seed was selected, no valid candidate exis
261
261
 
262
262
  Recommend **Gather more evidence** when exact instruction-set Final-held-out execution is unavailable, either scorer contract lacks the normalization and per-row paired-score path needed for a Final-held-out decision, plain-prompt policy requires Final-held-out proof before production, a plain-prompt live-first decision lacks a confirmed external/manual rollback path, set-of-one runner/settings provenance cannot be proven, the Final-held-out sample is too small, run-to-run noise was not measured and could plausibly explain the gain, no practical threshold was agreed, candidate evaluations are incomplete, or redaction prevents scenario diagnosis. Name the cheapest next measurement and do not imply that uncertainty is improvement.
263
263
 
264
- When a class is absent or thin in training, the optimizer cannot learn it from reflection. Return to J3 — Build the dataset. When labels or rationales are contested, repair ground truth and create a new dataset version before rerunning. When the scorer gives vague feedback or disagrees with human judgment, return to J5 — Build & validate judges. When the system needs tools, state, retrieval, or code, return to J2 — Assess & plan rather than forcing the behavior into instructions.
264
+ When a class is absent or thin in training, labels or rationales are contested, the scorer gives vague feedback or disagrees with human judgment, or the system needs tools, state, retrieval, or code, keep the finding in the Promote decision record and recommend Gather more evidence or Do not promote as the evidence supports. Complete the human decision without leaving Promote; after Promote exits, route through `flows/triage.md`. Triage decides whether coverage is missing, an eval is broken, or an application change is required; it amends the ratified plan when required and enters the complete admitted flow for any instruction optimization. Do not jump directly into a First win internal stage or force an application capability into instructions.
265
265
 
266
266
  If a run ends with budget exhausted, the coding agent may finish the run. A multi-component instruction-set non-seed finish records `--best-candidate` and the report but omits the prompt-only `--result-prompt-version`; its earlier unlabeled profile materialization is agent-safe and its later idempotent production-label move is human-only. For a plain-prompt non-seed run, the human performs the candidate's single production-labelled optimization promotion and the agent records the returned `promptVersionId` when finishing. For a set-of-one instruction-set non-seed run, the agent never calls optimization promotion, push, or a serving-pointer command under the current provenance gap; it recommends Gather more evidence and finishes without a result prompt version. Seed-selected and no-valid-candidate runs finish without promotion or a result version. Auto-promotion is human-only; coding agents must not enable it or configure a run to trigger it.
@@ -1,6 +1,8 @@
1
1
  # Optimization With GEPA
2
2
 
3
- How to optimize an instruction-set profile against validated judges and scorers. Prepare the complete instruction-set manifest, follow the [Authority map](../SKILL.md#authority-map) for its mutation, and then run the bundled `orizu optimizations run-gepa` flow. Use this reference for GEPA mechanics, custom optimizer implementations, and optional DSPy context for customers already using DSPy.
3
+ How to optimize an instruction-set profile against validated judges and scorers. Prepare the complete instruction-set manifest, follow the [Authority map](authority-map.md) for its mutation, and then run the bundled `orizu optimizations run-gepa` flow. Use this reference for GEPA mechanics, custom optimizer implementations, and optional DSPy context for customers already using DSPy.
4
+
5
+ When First win loads this reference, stop after the optimization run records a selected candidate or no-valid-candidate outcome. Do not write the decision report or run a promotion command until `flows/promote.md` is active. Steps 8–9 below describe Promote-owned continuation mechanics, not First win work.
4
6
 
5
7
  Select the profile explicitly with `--instruction-set <slug-or-exact-name> --model-config <identity>`. Those two selectors replace the legacy `--candidate-version-id` path and cannot be combined with it. The connector resolves that model config's production profile, or the set default when the profile has no production version, and optimizes its complete component map. `--component-selector round-robin` is the default and updates one component per round; `--component-selector all` updates every component per round. The runner receives a multi-component candidate as a component map, while a one-component set keeps the existing single-body runner contract. Git-pinned components and malformed component maps are refused before a run starts. Automatic promotion is refused for multi-component sets; write the report, obtain the human promotion decision, and follow the Authority map. Manifest create/push is the pre-run seed path, not a second accepted-candidate materialization; after a run, use the human one-shot or equivalent idempotent two-stage path in step 9.
6
8
 
@@ -57,7 +59,7 @@ Use the control plane described in `prompt-control-plane.md` when you want runs,
57
59
  6. Use `orizu optimizations run-gepa --optimizer-version-id <optimizer-version-id>` with the set slug and model-config identity. It uses official GEPA by default; `--engine legacy` is a frozen safety hatch while migration parity is proven. Use `orizu optimizations start` plus event logging for a custom optimizer. Candidates are ranked on the partition passed as `--val-split`; use that partition for validation, not Final-held-out.
58
60
  7. Use set scorers for selection/tracked reporting when the meaningful metric is batch-level; execute builtin set scorers with `orizu scorers exec` or submit precomputed aggregates with `orizu scores submit --aggregate`.
59
61
  8. Write and attach the optimization report by following “How To Build The Report” step 5 in `references/optimization-reports.md`: “Determine whether the current execution surfaces can reproduce the selected system before claiming a Final-held-out comparison.” Its “Flat-row scorer contract,” “Default GEPA scorer contract,” and “Instruction-set execution limits” subsections own the executable boundaries and current gaps.
60
- 9. After the human accepts the report, follow the [Authority map](../SKILL.md#authority-map). Simpler one-shot path: a human curator runs `orizu optimizations promote <run-id> --candidate <id> --label production --project <team/project>`, materializing and labeling once. In the two-stage path for multi-component or deliberately unlabeled materialization, an agent may materialize with `orizu optimizations promote <run-id> --candidate <id> --project <team/project>`. A human curator re-runs that same promotion as `orizu optimizations promote <run-id> --candidate <id> --label production --project <team/project>`. The idempotent finalizer reuses the existing materialized profile version, moves production to it, and creates no duplicate profile version or candidate-promoted event.
62
+ 9. After the human accepts the report, follow the [Authority map](authority-map.md). Simpler one-shot path: a human curator runs `orizu optimizations promote <run-id> --candidate <id> --label production --project <team/project>`, materializing and labeling once. In the two-stage path for multi-component or deliberately unlabeled materialization, an agent may materialize with `orizu optimizations promote <run-id> --candidate <id> --project <team/project>`. A human curator re-runs that same promotion as `orizu optimizations promote <run-id> --candidate <id> --label production --project <team/project>`. The idempotent finalizer reuses the existing materialized profile version, moves production to it, and creates no duplicate profile version or candidate-promoted event.
61
63
 
62
64
  The bundled Orizu GEPA-style optimizer supports configurable budget, minibatch size (default 3), candidate selection strategy, reflection model/template, reflection provider settings, evaluation caching, and optional auto-promotion. Use the report-first path: run without auto-promotion, write the report, obtain the human promotion decision, then route the manual promotion command through the Authority map. Only pass `--log-row-snapshots` when raw data in event logs is intentional.
63
65