@eigenpal/cli 0.20.43 → 0.20.45

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.
@@ -132,6 +132,39 @@ Use `output.textFormat` for representation and `output.require` for required evi
132
132
 
133
133
  Legacy `ai.parse` remains supported. Never mix its flat `parseMode`/`nativeText` settings into v2. Migrate to a new file with `eigenpal workflow migrate-parser workflow.yaml --policy preserve --out workflow-v2.yaml` or `--policy auto` to adopt recommended defaults. Preserve mode retains OCR-only restrictions; automatic mode can broaden egress and costs. Review reported changes and representative outputs before publishing.
134
134
 
135
+ ## Dataset ground truth and targeted reviews
136
+
137
+ Dataset `expected.json` must match the complete intended workflow output
138
+ one-to-one: the same fields, nesting, arrays, value types, and expected file
139
+ references. Keep the correct expected values, even when the workflow currently
140
+ returns something wrong. Never replace ground truth with the current run output
141
+ just to make an evaluator pass, and never add evaluator-only summaries, flattened
142
+ projections, comparison metadata, or reviewer instructions to expected output.
143
+ Evaluator configuration owns which outputs are cross-checked and how, including
144
+ ignored fields, tolerances, array matching, and custom comparisons.
145
+
146
+ A dataset review snapshots that complete expected output unchanged. Narrow the
147
+ review with flags and comments, never by pruning or reshaping `expected.json`:
148
+
149
+ - Use `--focus` or `--focus-reason` only for specific uncertain or incorrect
150
+ leaf paths, for example `items.3.amount`. A parent such as `items` flags every
151
+ descendant, potentially thousands of fields. Do not enumerate all fields as
152
+ focus paths unless the user explicitly requests a full-field review.
153
+ - Focus paths apply to every selected example. Group examples with the same
154
+ concerns into a request; create separate requests when their focus differs.
155
+ - Use `--field-note 'invoice-foo.items.3.amount=Workflow currently returns 12.50; expected 10.50. Verify the source line.'`
156
+ to attach evidence to that exact field. Notes do not flag fields: add a focus
157
+ path separately when it needs a decision. Preserve the actual value as a
158
+ comment, not as replacement ground truth.
159
+ - For an existing review, use `item --action comment --field-path items.3.amount
160
+ --comment 'Workflow currently returns 12.50; expected 10.50. Verify the source line.'
161
+ --expected-updated-at <iso>`. Use `update --focus-json '[{"path":"items.3.amount","reason":"Amount differs from source"}]'`
162
+ to replace an overly broad focus list, or `--focus-json '[]'` to clear it.
163
+ - Before sharing a review, inspect `get --json`: verify the complete expected
164
+ output, a short justified `focusFields` list, and field-specific note events.
165
+ An unflagged field remains visible for context; it does not need a flag merely
166
+ because it appears in the dataset. Never approve on the human reviewer's behalf.
167
+
135
168
  ## Workflow Loop
136
169
 
137
170
  ```bash
@@ -188,7 +221,7 @@ eigenpal workflow evaluators push <workflow-id> --file ./evaluators.yaml
188
221
  eigenpal workflow dataset review-request create <workflow-id> \
189
222
  --title "<topic> GT review" --example-name <example-name> \
190
223
  --focus <path> --focus-reason '<path>=why' --ignore <path> \
191
- --item-note '<example>=note' --field-note '<example.path>=note' \
224
+ --item-note '<example>=note' --field-note '<example.path>=Workflow currently returns <actual>; expected <expected>. Verify against the source.' \
192
225
  --status open --json
193
226
  # Poll .progress.complete until reviewers finish. Record field decisions and
194
227
  # approve/reject with comments as needed, then pull and MANUAL reconcile —
@@ -725,21 +725,21 @@ Request human review of dataset ground truth. Snapshot examples and poll progres
725
725
 
726
726
  ### Options
727
727
 
728
- | Flag | Required | Default | Description |
729
- | -------------------------------- | -------- | ------- | -------------------------------------------------------------------------------- |
730
- | `--base-url <url>` | no | | Server base URL |
731
- | `--json` | no | | Emit machine-readable JSON on stdout |
732
- | `--title <title>` | yes | | Review request title |
733
- | `--example-name <name>` | yes | `[]` | Example folder name to include (repeatable) |
734
- | `--instructions <text>` | no | | Note shown to the reviewer for the whole request |
735
- | `--focus <path>` | no | `[]` | Expected-output path to highlight (repeatable) |
736
- | `--focus-reason <spec>` | no | `[]` | Reason a focus path needs review, as path=reason (repeatable) |
737
- | `--ignore <path>` | no | `[]` | Expected-output path reviewers can skip (repeatable) |
738
- | `--item-note <spec>` | no | `[]` | Example-level note seeded at create time, as exampleName=comment (repeatable) |
739
- | `--field-note <spec>` | no | `[]` | Field-level note seeded at create time, as exampleName.path=comment (repeatable) |
740
- | `--focus-json <json>` | no | | JSON array of { path, reason? } focus fields |
741
- | `--notes-json <json>` | no | | JSON array of { exampleName, comment?, fields?: [{ path, comment }] } |
742
- | `--status <draft\|open\|paused>` | no | | Initial lifecycle status (default: draft) |
728
+ | Flag | Required | Default | Description |
729
+ | -------------------------------- | -------- | ------- | ----------------------------------------------------------------------------------------------------------- |
730
+ | `--base-url <url>` | no | | Server base URL |
731
+ | `--json` | no | | Emit machine-readable JSON on stdout |
732
+ | `--title <title>` | yes | | Review request title |
733
+ | `--example-name <name>` | yes | `[]` | Example folder name to include (repeatable) |
734
+ | `--instructions <text>` | no | | Note shown to the reviewer for the whole request |
735
+ | `--focus <path>` | no | `[]` | Expected-output leaf path to flag across selected examples; parent paths flag every descendant (repeatable) |
736
+ | `--focus-reason <spec>` | no | `[]` | Reason a focus path needs review, as path=reason (repeatable) |
737
+ | `--ignore <path>` | no | `[]` | Expected-output path reviewers can skip (repeatable) |
738
+ | `--item-note <spec>` | no | `[]` | Example-level note seeded at create time, as exampleName=comment (repeatable) |
739
+ | `--field-note <spec>` | no | `[]` | Field comment only, as exampleName.path=comment; does not flag the field (repeatable) |
740
+ | `--focus-json <json>` | no | | JSON array of { path, reason? } focus fields |
741
+ | `--notes-json <json>` | no | | JSON array of { exampleName, comment?, fields?: [{ path, comment }] } |
742
+ | `--status <draft\|open\|paused>` | no | | Initial lifecycle status (default: draft) |
743
743
 
744
744
  ### `eigenpal agents dataset review-request get [options] <automation-id> <review-id>`
745
745
 
@@ -701,21 +701,21 @@ Request human review of dataset ground truth. Snapshot examples and poll progres
701
701
 
702
702
  ### Options
703
703
 
704
- | Flag | Required | Default | Description |
705
- | -------------------------------- | -------- | ------- | -------------------------------------------------------------------------------- |
706
- | `--base-url <url>` | no | | Server base URL |
707
- | `--json` | no | | Emit machine-readable JSON on stdout |
708
- | `--title <title>` | yes | | Review request title |
709
- | `--example-name <name>` | yes | `[]` | Example folder name to include (repeatable) |
710
- | `--instructions <text>` | no | | Note shown to the reviewer for the whole request |
711
- | `--focus <path>` | no | `[]` | Expected-output path to highlight (repeatable) |
712
- | `--focus-reason <spec>` | no | `[]` | Reason a focus path needs review, as path=reason (repeatable) |
713
- | `--ignore <path>` | no | `[]` | Expected-output path reviewers can skip (repeatable) |
714
- | `--item-note <spec>` | no | `[]` | Example-level note seeded at create time, as exampleName=comment (repeatable) |
715
- | `--field-note <spec>` | no | `[]` | Field-level note seeded at create time, as exampleName.path=comment (repeatable) |
716
- | `--focus-json <json>` | no | | JSON array of { path, reason? } focus fields |
717
- | `--notes-json <json>` | no | | JSON array of { exampleName, comment?, fields?: [{ path, comment }] } |
718
- | `--status <draft\|open\|paused>` | no | | Initial lifecycle status (default: draft) |
704
+ | Flag | Required | Default | Description |
705
+ | -------------------------------- | -------- | ------- | ----------------------------------------------------------------------------------------------------------- |
706
+ | `--base-url <url>` | no | | Server base URL |
707
+ | `--json` | no | | Emit machine-readable JSON on stdout |
708
+ | `--title <title>` | yes | | Review request title |
709
+ | `--example-name <name>` | yes | `[]` | Example folder name to include (repeatable) |
710
+ | `--instructions <text>` | no | | Note shown to the reviewer for the whole request |
711
+ | `--focus <path>` | no | `[]` | Expected-output leaf path to flag across selected examples; parent paths flag every descendant (repeatable) |
712
+ | `--focus-reason <spec>` | no | `[]` | Reason a focus path needs review, as path=reason (repeatable) |
713
+ | `--ignore <path>` | no | `[]` | Expected-output path reviewers can skip (repeatable) |
714
+ | `--item-note <spec>` | no | `[]` | Example-level note seeded at create time, as exampleName=comment (repeatable) |
715
+ | `--field-note <spec>` | no | `[]` | Field comment only, as exampleName.path=comment; does not flag the field (repeatable) |
716
+ | `--focus-json <json>` | no | | JSON array of { path, reason? } focus fields |
717
+ | `--notes-json <json>` | no | | JSON array of { exampleName, comment?, fields?: [{ path, comment }] } |
718
+ | `--status <draft\|open\|paused>` | no | | Initial lifecycle status (default: draft) |
719
719
 
720
720
  ### `eigenpal workflow dataset review-request get [options] <automation-id> <review-id>`
721
721
 
@@ -42,8 +42,16 @@ are explicit references:
42
42
  }
43
43
  ```
44
44
 
45
- `expected.json` mirrors the expected automation output. Expected files use the
46
- same reference shape with the `expected/` prefix.
45
+ `expected.json` must mirror the complete intended automation output one-to-one:
46
+ fields, nesting, array structure, value types, and expected file references.
47
+ Expected files use the same reference shape with the `expected/` prefix.
48
+ Use the correct expected values even when the workflow currently returns wrong
49
+ values. Evaluators define which parts to cross-check and how (tolerances, ignored
50
+ fields, array matching, custom comparison); do not flatten, summarize, omit fields,
51
+ or add comparison-only metadata to ground truth to suit evaluator logic.
52
+ Dataset reviews snapshot that full expected output unchanged. Review scope and
53
+ reviewer evidence belong in focus paths and field comments, not in a reduced or
54
+ augmented expected-output object.
47
55
 
48
56
  ## Rules
49
57
 
@@ -327,6 +335,23 @@ There is **no auto-apply** by design: after review, `dataset pull` and
327
335
  manually reconcile each example into the live dataset (reviewers can err).
328
336
  Close via `update --status closed`.
329
337
 
338
+ Flag only uncertain or incorrect leaf paths with `--focus` / `--focus-reason`.
339
+ A parent path such as `items` flags every descendant; prefer `items.3.amount`
340
+ when only that value needs checking. Focus is shared across the selected examples;
341
+ use separate requests for examples with different concerns. Do not flag every
342
+ field just because the complete dataset is visible. An empty focus list flags
343
+ nothing, while all output fields remain available as context.
344
+
345
+ `--field-note 'invoice-foo.items.3.amount=Workflow currently returns 12.50; expected 10.50. Verify the source line.'`
346
+ leaves a comment on that exact example and field without flagging it. Add a focus
347
+ path separately if it needs review. For an existing request, use `item --action
348
+ comment --field-path items.3.amount --comment 'Workflow currently returns 12.50; expected 10.50.'
349
+ --expected-updated-at <iso>`. Read the item first to obtain its timestamp.
350
+ Inspect `get --json` before sharing: check the full expected output, the intended
351
+ focus list, and field note events. To repair excessive flags, replace the list
352
+ with `update --focus-json '[{"path":"items.3.amount","reason":"Amount differs from source"}]'`;
353
+ `--focus-json '[]'` clears it. This changes review scope, not dataset content.
354
+
330
355
  ```bash
331
356
  # Ask a reviewer to inspect specific fields, with reasons, then poll until done.
332
357
  eigenpal workflow dataset review-request create <automation-id> \
@@ -335,7 +360,7 @@ eigenpal workflow dataset review-request create <automation-id> \
335
360
  --instructions "Check IBAN checksums and invoice totals." \
336
361
  --focus vendor.iban --focus-reason 'vendor.iban=OCR often mangles IBANs' \
337
362
  --ignore currency \
338
- --field-note 'invoice-foo.total=off by 0.01 last run' \
363
+ --field-note 'invoice-foo.vendor.iban=Workflow currently returns SK12; expected SK34. Verify against the document.' \
339
364
  --status open --json
340
365
 
341
366
  # List requests; `.progress.complete` means every example was decided.
@@ -8294,7 +8294,7 @@ Pause the run for selective field confirmation or correction, then continue with
8294
8294
  | --- | --- | --- | --- | --- |
8295
8295
  | `data` | string \| record<string, unknown> \| array<unknown> | yes | | Structured data or a template expression resolving to an object or array |
8296
8296
  | `schema` | record<string, unknown> | no | | Optional JSON Schema for validating edits and exposing downstream autocomplete. When omitted with metadataFrom: ai.extract and a direct whole-output data expression, the extract step schema is reused. |
8297
- | `metadataFrom` | `"ai.extract"` | no | | Producer adapter. `ai.extract` derives field confidence from `_grounding` and strips that reserved key from review data. Grounding is not stripped unless this is set. |
8297
+ | `metadataFrom` | `"ai.extract"` | no | | Producer adapter. `ai.extract` derives categorical field confidence from `_grounding`, copies valid numeric grounding scores into fieldMetadata.display.score, and strips that reserved key from review data. Grounding is not stripped unless this is set. |
8298
8298
  | `fieldMetadata` | record<string, object> | no | `{}` | RFC 6901 pointer map of producer facts (labels, confidence, display). Selection policy belongs under selection.fields; fieldMetadata.review is a legacy alias. |
8299
8299
  | `selection` | object | yes | | Field selection policy resolved once when the task is created |
8300
8300
  | `files` | object | no | `{"includeRunInputs":true,"attachments":[]}` | Run input files and optional current-run attachments for reviewers |
@@ -8346,7 +8346,7 @@ Config schema:
8346
8346
  "enum": [
8347
8347
  "ai.extract"
8348
8348
  ],
8349
- "description": "Producer adapter. `ai.extract` derives field confidence from `_grounding` and strips that reserved key from review data. Grounding is not stripped unless this is set."
8349
+ "description": "Producer adapter. `ai.extract` derives categorical field confidence from `_grounding`, copies valid numeric grounding scores into fieldMetadata.display.score, and strips that reserved key from review data. Grounding is not stripped unless this is set."
8350
8350
  },
8351
8351
  "fieldMetadata": {
8352
8352
  "description": "RFC 6901 pointer map of producer facts (labels, confidence, display). Selection policy belongs under selection.fields; fieldMetadata.review is a legacy alias.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eigenpal/cli",
3
- "version": "0.20.43",
3
+ "version": "0.20.45",
4
4
  "description": "Eigenpal CLI — author and run document workflows from your terminal. Agent-ready.",
5
5
  "keywords": [
6
6
  "eigenpal",