onesie

module
v0.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2026 License: MIT

README

onesie

CI Release License Go Reference

Gate scripts and CI on fast, calibrated System One judgments: a score, a choice or an exit code.

onesie scores a ticket, picks a team, gates on a saved question and calibrates it

Route a support ticket by naming the teams that can handle it.

echo 'I was charged twice for my order' | onesie 'who should handle this' --pick billing,shipping,technical -o raw
# billing

Run the same decision over a CSV export saved as tickets.csv. --merge keeps the input columns and adds the chosen team. The error column is empty when the row succeeds.

id,body
1,I was charged twice for my order
onesie --ask team='who should handle this' --pick billing,shipping,technical \
    -i csv --map .body -o csv --merge < tickets.csv
id,body,team,error
1,I was charged twice for my order,billing,

Thresholds from evidence

The built in shell-safety gate passes, blocks or asks a person to review a command. Its thresholds are chosen from 40 labelled commands and their saved answers.

onesie -f shell-safety -q --state 'git status'
# exit 0: pass
onesie -f shell-safety -q --state 'rm -rf ~'
# exit 1: fail, so block
onesie -f shell-safety -q --state 'echo hello > notes.txt'
# exit 7: unsure, so hand off to a person

For destroys, shell-safety blocks at 0.5 and passes below 0.25. The overwrite command scored 0.37, so it goes to a person. Use your own labelled commands to choose thresholds for your gate. Reproduce the check offline without a key.

Install

Homebrew, on macOS or Linux:

brew install frodi-karlsson/tap/onesie

The install script checks the download against the release checksums, and its build provenance when gh is logged in:

curl -fsSL https://raw.githubusercontent.com/frodi-karlsson/onesie/main/install.sh | sh

The script installs to ~/.local/bin. Set ONESIE_INSTALL_DIR for another directory, or ONESIE_VERSION for a release other than the latest, such as 0.14.0.

With Go:

go install github.com/frodi-karlsson/onesie/cmd/onesie@latest

Then store a key in a profile with onesie profile create work --provider typesafe, which prompts for it and keeps it in the OS keychain.

In GitHub Actions, setup-onesie installs it with the same checksum and provenance checks, and the key comes from a secret instead of a profile:

- uses: frodi-karlsson/setup-onesie@v1

In Claude Code, the plugin can come first and walk you through the rest:

/plugin marketplace add frodi-karlsson/onesie
/plugin install onesie@onesie
Uninstall

While the binary is still installed, run onesie profile list, then onesie profile delete NAME for each profile, which also removes its key from the OS keychain. Then remove:

  1. The binary, from ~/.local/bin or $ONESIE_INSTALL_DIR.
  2. The config dir, which also holds saved question files: $ONESIE_CONFIG_DIR if set, else $XDG_CONFIG_HOME/onesie, else %APPDATA%\onesie on Windows and ~/.config/onesie elsewhere.
  3. The cache dir: $ONESIE_CACHE_DIR if set, else $XDG_CACHE_HOME/onesie, else ~/Library/Caches/onesie on macOS, %LOCALAPPDATA%\onesie on Windows and ~/.cache/onesie on Linux.

More decisions

--ask names several questions in one request. --rate chooses a level on an ordered scale. -f loads saved questions, and onesie questions lists the four calibrated starter sets. Worked recipes cover streams, resumable batches, pull request comments, ranking and local servers. Mock answers exercise a script without calling a model.

onesie supports TypeSafe, OpenRouter, Berget, Levanto and Cloudflare. Profiles hold provider settings and keys. --cache reuses answers, --print-request previews requests without a key, and experimental --image and --box questions work with images.

Help and settings

onesie --help shows common tasks. Use onesie help decisions for gates, onesie help exit-codes for exit codes, onesie help input for streams, and onesie help all for the full flag reference. onesie help calibrate all covers calibration.

Look up configuration precedence, profile fields, environment variables and question file keys.

Contributing

See CONTRIBUTING.md.

License

MIT. See LICENSE.

Directories

Path Synopsis
cmd
examplesanswers command
Command examplesanswers regenerates the starter sets' committed answers files from the live API, with the pinned model.
Command examplesanswers regenerates the starter sets' committed answers files from the live API, with the pinned model.
examplesimage command
Command examplesimage writes the example image the docs and skills use.
Command examplesimage writes the example image the docs and skills use.
formulagen command
Command formulagen writes the Homebrew formula for a release from the release's checksums.txt.
Command formulagen writes the Homebrew formula for a release from the release's checksums.txt.
onesie command
Command onesie asks System One models typed questions about text from the shell.
Command onesie asks System One models typed questions about text from the shell.
proseblocks command
Command proseblocks reads a unified diff on stdin and writes the prose blocks of the Go and Markdown files that overlap an added line as JSON lines of {"id":"path:line","text":"..."}.
Command proseblocks reads a unified diff on stdin and writes the prose blocks of the Go and Markdown files that overlap an added line as JSON lines of {"id":"path:line","text":"..."}.
releaseprep command
Command releaseprep checks a release tag against the existing ones and bumps the plugin manifests to it.
Command releaseprep checks a release tag against the existing ones and bumps the plugin manifests to it.
settingsgen command
Command settingsgen writes the question file schema and the REFERENCE.md settings blocks from the settings rows.
Command settingsgen writes the question file schema and the REFERENCE.md settings blocks from the settings rows.
skillcheck command
Command skillcheck dry runs every rule's bad and good example under skills/, checks the flags and commands the prose names against onesie --help, and checks the punctuation of the docs.
Command skillcheck dry runs every rule's bad and good example under skills/, checks the flags and commands the prose names against onesie --help, and checks the punctuation of the docs.
skilleval command
Command skilleval dry runs every onesie command an agent wrote during the last claude plugin eval run.
Command skilleval dry runs every onesie command an agent wrote during the last claude plugin eval run.
skillgen command
Command skillgen generates the per client skill files from skills/.
Command skillgen generates the per client skill files from skills/.
Package examples describes the starter question sets, so the tests and the tool that regenerates their answers read each set the same way.
Package examples describes the starter question sets, so the tests and the tool that regenerates their answers read each set the same way.
questions
Package questions holds the starter question sets built into onesie, so -f finds them by name with no copy step.
Package questions holds the starter question sets built into onesie, so -f finds them by name with no copy step.
internal
answer
Package answer normalizes API answers into the shape the CLI prints and applies the per question policy.
Package answer normalizes API answers into the shape the CLI prints and applies the per question policy.
answersfile
Package answersfile opens, locks, resumes and compacts the file a run writes its answers to.
Package answersfile opens, locks, resumes and compacts the file a run writes its answers to.
argv
Package argv records group local flags in the order pflag encounters them, so the question groups in a command line can be reconstructed after parsing.
Package argv records group local flags in the order pflag encounters them, so the question groups in a command line can be reconstructed after parsing.
assert
Package assert evaluates a boolean expression over a normalized record.
Package assert evaluates a boolean expression over a normalized record.
cache
Package cache stores API responses on disk under a sha256 key, with private modes, atomic writes, a lifetime for model aliases and a size cap enforced by least recently used eviction.
Package cache stores API responses on disk under a sha256 key, with private modes, atomic writes, a lifetime for model aliases and a size cap enforced by least recently used eviction.
calibrate
Package calibrate reads the labels a calibration run compares answers with, and scores and reports how well the answers agree with them.
Package calibrate reads the labels a calibration run compares answers with, and scores and reports how well the answers agree with them.
cli
Package cli assembles the onesie command tree.
Package cli assembles the onesie command tree.
creds
Package creds resolves, reads and writes the profiles file that holds each profile's API key, and converts the credentials.json it replaces.
Package creds resolves, reads and writes the profiles file that holds each profile's API key, and converts the credentials.json it replaces.
delimiter
Package delimiter parses delimited input separators.
Package delimiter parses delimited input separators.
engine
Package engine runs one evaluation per record the source yields, bounded by concurrency and ordered by input position.
Package engine runs one evaluation per record the source yields, bounded by concurrency and ordered by input position.
formula
Package formula renders the Homebrew formula for a onesie release from the release's checksums.
Package formula renders the Homebrew formula for a onesie release from the release's checksums.
input
Package input resolves where a state comes from and reads it, so the detection rule lives in one place rather than being rediscovered at every call site.
Package input resolves where a state comes from and reads it, so the detection rule lives in one place rather than being rediscovered at every call site.
interrupt
Package interrupt lets a caller stop waiting on a read that has no deadline.
Package interrupt lets a caller stop waiting on a read that has no deadline.
jq
Package jq compiles and runs the jq expressions that --map, --id and --label take, through gojq.
Package jq compiles and runs the jq expressions that --map, --id and --label take, through gojq.
jsonschema
Package jsonschema holds the JSON Schema nodes onesie builds its schemas from, with properties kept in the order they are declared.
Package jsonschema holds the JSON Schema nodes onesie builds its schemas from, with properties kept in the order they are declared.
limits
Package limits holds the constants onesie version reports.
Package limits holds the constants onesie version reports.
mock
Package mock reads a file of canned answers and checks it against the questions a run asks, so the run can answer from it with no key and no network.
Package mock reads a file of canned answers and checks it against the questions a run asks, so the run can answer from it with no key and no network.
num
Package num writes and rounds the numbers onesie prints, so every output mode shows the same one.
Package num writes and rounds the numbers onesie prints, so every output mode shows the same one.
output
Package output encodes a normalized record in each of the modes the CLI offers.
Package output encodes a normalized record in each of the modes the CLI offers.
patherr
Package patherr strips the operation and path an *fs.PathError carries, for a message that names the path itself.
Package patherr strips the operation and path an *fs.PathError carries, for a message that names the path itself.
plan
Package plan turns a recorded command line into a validated invocation, ready to run.
Package plan turns a recorded command line into a validated invocation, ready to run.
proseblocks
Package proseblocks finds the pieces of prose a change touches in Go and Markdown files: one block per comment group, paragraph or list item.
Package proseblocks finds the pieces of prose a change touches in Go and Markdown files: one block per comment group, paragraph or list item.
providers
Package providers words onesie-go's provider list for help and messages, so a provider the library adds reaches every one of them.
Package providers words onesie-go's provider list for help and messages, so a provider the library adds reaches every one of them.
qfile
Package qfile loads a question file or a raw API request body into the ordered question slice the planner already consumes.
Package qfile loads a question file or a raw API request body into the ordered question slice the planner already consumes.
release
Package release checks a release tag against the existing ones and bumps the plugin manifests to it.
Package release checks a release tag against the existing ones and bumps the plugin manifests to it.
settingrow
Package settingrow holds every run setting as one row: its flag, its environment variables, its question file key, its profile members, its kind and its help.
Package settingrow holds every run setting as one row: its flag, its environment variables, its question file key, its profile members, its kind and its help.
settings
Package settings merges sources and validates the settings of a run.
Package settings merges sources and validates the settings of a run.
settingsgen
Package settingsgen writes the files the settings rows generate: the question file schema and the settings blocks of REFERENCE.md.
Package settingsgen writes the files the settings rows generate: the question file schema and the settings blocks of REFERENCE.md.
skillcheck
Package skillcheck dry runs every rule's bad and good example in a skill.
Package skillcheck dry runs every rule's bad and good example in a skill.
skilleval
Package skilleval dry runs every onesie command an agent wrote during a claude plugin eval run, since the eval has no grader that can run code.
Package skilleval dry runs every onesie command an agent wrote during a claude plugin eval run, since the eval has no grader that can run code.
skillgen
Package skillgen decodes and validates skill.json, the schema a generated skill is built from.
Package skillgen decodes and validates skill.json, the schema a generated skill is built from.
wording
Package wording holds the small rules onesie follows when it writes English for people.
Package wording holds the small rules onesie follows when it writes English for people.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL