Ster/Docs

ster pairs edit

Change one pair's sides, or the set's trait name, by the zero-based index remove takes.

Invocation and purpose#

text
ster pairs edit --pairs <PAIRS> --index <INDEX> [--positive <POSITIVE>] [--negative <NEGATIVE>] [--trait <TRAIT>]

The counterpart of `ster pairs add` for one pair already in the set: only the sides given change, and the rest of the file is written back as it was. No model is loaded.

Inputs and options#

InputRequiredMeaning
--pairs <PAIRS>yesExisting pair-set JSON.
--index <INDEX>yesZero-based position of the pair, as `ster pairs inspect` reports it.
--positive <POSITIVE>noNew text of the positive side; must not be blank.
--negative <NEGATIVE>noNew text of the negative side; must not be blank.
--trait <TRAIT>noSets or replaces the set's trait_name.

Output and state#

Rewrites the file as pretty-printed JSON with a trailing newline. Stdout is a pretty JSON document with path, pair_count, and edited carrying the index, positive, and negative of the pair as it now stands.

Refusals#

  • An edit naming none of --positive, --negative and --trait is refused as pairs edit changes nothing without --positive, --negative or --trait (nothing-to-change, exit 2), and a side given as empty or whitespace-only text as --<side> is empty or only whitespace, and every pair needs text on both sides (side-empty, exit 2); both before the set is read.
  • The set is then loaded, 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.
  • An index at or past the end is refused as pair index <N> is outside the set: <PATH> holds <COUNT> pair(s), indexed from 0 (index-outside), naming the last index there is; the file is left untouched.