Ster/Docs

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#

text
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#

InputRequiredMeaning
--pairs <PAIRS>yesPair-set JSON to append to. A path that does not exist yet is created, together with its missing parent directories.
--positive <POSITIVE>yesText of the positive side; must not be blank.
--negative <NEGATIVE>yesText of the negative side; must not be blank.
--trait <TRAIT>noSets 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, and pair set <PATH> contains an empty positive or negative prompt.
  • The write validates the set first, so a blank --positive or --negative is refused as pair set <PATH> contains an empty positive or negative prompt and nothing is written.
  • A parent directory that cannot be created is refused as failed to create <PARENT>, and a failed write as failed to write pair set <PATH>.