ster pairs add
Append one contrastive pair to a pair set, creating the file and its parent directories when they do not exist.
Invocation and purpose#
ster pairs add --pairs <PAIRS> --positive <POSITIVE> --negative <NEGATIVE> [--trait <TRAIT>]Loads the set when the file exists and starts an empty one when it does not, appends the pair, and writes the whole document back. No model is loaded.
Inputs and options#
| Input | Required | Meaning |
|---|---|---|
--pairs <PAIRS> | yes | Pair-set JSON to append to. A path that does not exist yet is created, together with its missing parent directories. |
--positive <POSITIVE> | yes | Text of the positive side; must not be blank. |
--negative <NEGATIVE> | yes | Text of the negative side; must not be blank. |
--trait <TRAIT> | no | Sets or replaces the set's trait_name. An existing name is kept when this is omitted. |
Output and state#
Writes the set back as pretty-printed JSON with a trailing newline: pair files are hand-edited and read in review, so they are stored readably rather than compactly like steering artifacts. Stdout is a pretty JSON document with path, the new pair_count, and added carrying the zero-based index the pair landed at.
Refusals#
- An existing file is loaded before the append, so the load refusals apply:
failed to read pair set <PATH>,invalid pair set JSON in <PATH>,pair set <PATH> contains no pairs, andpair set <PATH> contains an empty positive or negative prompt. - The write validates the set first, so a blank
--positiveor--negativeis refused aspair set <PATH> contains an empty positive or negative promptand nothing is written. - A parent directory that cannot be created is refused as
failed to create <PARENT>, and a failed write asfailed to write pair set <PATH>.