On this page
skryba rewrite
Generate rewrite candidates, quality-judge and detector-score them, and select the least detectable candidate that passes quality, required style, and output-language checks for every chunk.
Invocation
skryba [GLOBAL OPTIONS] --minimum-quality <F> rewrite [INPUT] --generator <brama|local> [--output <PATH>] [--report <PATH>] [--json] [--policy <PATH>]
[--style <NAME>] [--language <NAME>]
--candidates <N> --max-words-per-chunk <N> --temperature <VALUE> --seed <SEED>
[--local-model <MODEL>] [--local-revision <REV>] [--adapter <PATH>]
[--local-device <DEVICE>] [--local-precision <PRECISION>] [--local-chat-template <MODE>] [--local-max-new-tokens <N>] (the last required with --generator local)
INPUT is a UTF-8 file path or - for stdin and defaults to -. --candidates, --max-words-per-chunk, --temperature and --seed are required: Skryba assumes none of them, and a missing one is refused by the parser with exit 2. The global --minimum-quality is required as well. --policy loads a saved strategy policy. Global model, judge, minimum-quality, detector, and Brama options precede rewrite.
Required style and output language
--style and --language each name one entry of the catalog: rows of Skryba's fleet database holding the styles and languages the person offers. Both default to preserve. The entry's instruction is what the generator writes to and what the quality judge checks every candidate against, so adding a style or a language is skryba style add or skryba language add, not a new release.
A new catalog starts with these entries; each can be changed or removed like any other, except that preserve can only be changed:
| Style | Starting instruction, in short |
|---|---|
preserve |
Keep the source's register, audience, degree of formality, and speaker. |
academic |
Precise scholarly prose; keep claims, their strength, terminology, qualifications, and citations; invent no studies, evidence, citations, hedging, or reviewer objections. |
message |
Direct, natural correspondence; keep every detail and citation, the speaker and the addressee; invent no greetings, recipients, signatures, promises, or familiarity. |
| Language | Starting instruction, in short |
|---|---|
preserve |
Keep each passage's existing language, including multilingual content. |
pl |
Write Polish, translating when needed. |
en |
Write English, translating when needed. |
skryba style list and skryba language list print the full instructions the catalog actually holds. A style is not a sampled strategy such as scholarly-human. The required profile takes precedence over conflicting policy instructions and over a personal adapter's learned voice. It does not retrain the policy or adapter. Translation must preserve meaning, certainty, facts, and qualifications; the generator and judge must support the requested language, and the flag does not change the selected models or detector services.
Examples, not captured successful model runs. $KNOBS stands for the four required settings, --candidates <N> --max-words-per-chunk <N> --temperature <T> --seed <N>:
skryba --minimum-quality <Q> rewrite - --generator brama $KNOBS
skryba --minimum-quality <Q> rewrite draft.txt --generator brama $KNOBS --style academic --language en --report report.json
skryba --minimum-quality <Q> rewrite draft.txt --generator brama $KNOBS --style message --language pl --output message.txt
skryba style add status-update --instruction "Write a short status update: the result first, then the limits and the next step."
skryba --minimum-quality <Q> rewrite draft.txt --generator brama $KNOBS --style status-update --json
Where candidates come from
--generator is required: no generator is assumed, and a rewrite without it is refused by the parser with exit 2. --generator brama uses one Brama chat completion per candidate, with no token budget sent, and no local weights. --generator local spawns one ster generate per candidate, with --adapter attached. It requires --local-model naming the checkpoint Ster maps and --local-max-new-tokens, the per-candidate token budget, because Ster assumes none. --local-revision, --local-device (default cpu), --local-precision (default f32) and --local-chat-template (default auto) are passed through to Ster.
Both routes receive the same required style and language and use the same strategy policy, detector ensemble, quality judge, and least-detectable selection. The judge is Brama's either way, so a resolvable BRAMA_TOKEN_ROLE=ROLE#FIELD is still required with --generator local. Each local candidate maps the checkpoint in a separate process; the group runs sequentially so only one copy of the weights is resident. See the training boundary.
Output and state
Without --json, stdout is selected rewritten text unless --output writes that text instead. --json prints the complete RewriteResult; --report independently writes the same structured result. The report includes profile.style, profile.style_instruction, profile.language, and profile.language_instruction — the names and the exact instructions this run used, so a report still says what it was held to after the catalog changes — and each quality evaluation's required style_matched and language_matched booleans. A generated candidate passes only when both are true and the existing quality thresholds and critical-error check pass.
If no generated candidate passes, Skryba judges the original against the requested profile. Only an original that matches both choices is detector-scored and kept as used_source_fallback: true. The fallback can still have quality_passed: false: its numeric quality thresholds are not newly required.
If the original does not match the requested style or language, the whole rewrite fails. The diagnostic names the chunk, profile, source match booleans, candidate rejection counts, and source judge issues. Style, language, and all-quality rejection counts may overlap. Final --output and --report files are not written, and existing files at those destinations remain untouched. Model calls already made and score-cache writes are not rolled back.
Refusals
- A missing
--generator,--candidates,--max-words-per-chunk,--temperatureor--seedis refused by the parser with exit2, naming the flag. --minimum-quality is required: the quality score a rewrite must reach is the caller's to state.style "<NAME>" is not in stado://database/skryba/<SCHEMA>; available styles: <NAMES>; add it with `skryba style add <NAME> --instruction <TEXT>`and the same sentence forlanguage: the name is not in the catalog. Exit1, before any detector or Brama credential is read and before any output or report file is touched.chunk <N>: no candidate passed every check for the requested style '<STYLE>' and language '<LANGUAGE>'; source fallback refused ...: neither the candidates nor the original can fulfill the complete request. A candidate can match the profile and still fail content quality. Read the match booleans, rejection counts, and judge issues. Use a capable model, sharpen the entry's instruction withskryba style edit, or reconsider the requested profile; an original in another language is not a successful translation.candidate count must be positive.maximum words per chunk must be positive.temperature must be a finite number of at least 0. Skryba keeps no ceiling of its own: Brama refuses a temperature above its bound in its own words, and a local Ster run has none.minimum quality must be between 0 and 1.input text cannot be empty.- Missing/malformed policy is reported as
reading policy <PATH>orparsing policy <PATH>; unsupported versions and malformed vectors are refused. - Detector credential and provider failures are the same as
score. A style selection does not bypass them. Brama role references must resolve valid credentials, and paired agent authentication is refused unless bothSKRYBA_AGENT_IDandSKRYBA_AGENT_AUTH_SECRET_ROLEare configured. Secret-valuedBRAMA_TOKENandSKRYBA_AGENT_AUTH_SECRETare not read; see configuration. --generator local needs --local-model naming the checkpoint Ster maps; an empty checkpoint isthe local generator needs a checkpoint; pass --local-model.--generator local needs --local-max-new-tokens; Ster assumes no token budget, and--local-max-new-tokens must be positive.- A missing binary is
ster is not installed: install it with `cargo install --git https://github.com/wisent-ai/ster --locked`, or put the `ster` binary on PATH. - A local whitespace completion is dropped with
candidate <N> (<strategy>) came back as whitespace from `ster generate`; dropping it from the groupon stderr. The remaining candidates still need to pass every check; source fallback is subject to the same profile restriction. Other Ster failures surface Ster's own stderr, minus its outerError:frame. - A failure to reach the fleet database names its step; see
skryba database check. - The setup order is the fleet database and catalog, then detectors, then Brama for the judge, then the local generator. With no detector key configured, local generation also refuses with the detector sentence first.
The desktop exposes the same choices and diagnostics in Rewrite, passing --generator brama or --generator local explicitly, and manages the catalog in Styles & languages. Successful real generator, judge, and detector flows are required to qualify style quality and translation; help output, compilation, and fixture-provider runs are not that proof.
Maintained as part of the website-owned Skryba documentation corpus.