humanize rewrite
Rewrite paper prose with Skryba, choosing Brama or your trained adapter.
Invocation#
lem-cli humanize rewrite [input|-] --generator brama|local --style <name> --language <name> --candidates <n> --max-words-per-chunk <n> --temperature <t> --seed <n> --minimum-quality <q> [--local-model <checkpoint> --adapter <path> --local-device <device> --local-precision <precision> --local-chat-template <template> --local-max-new-tokens <n> --local-revision <revision>]Inputs and options#
- input is one optional file path; - or no input reads stdin. A ~/ prefix expands to the current home directory. The rewrite is returned for review, not silently applied to the manuscript.
- --generator is required: brama uses the shared model route; local calls Ster with the Skryba-trained personal adapter. The local route requires --local-model, --adapter, --local-device, --local-precision, --local-chat-template and --local-max-new-tokens. --local-revision is optional.
- --style chooses a Skryba task profile such as academic; --language names its output-language profile. Both must be stated; neither is a measure of the author's identity. --candidates, --max-words-per-chunk, --temperature, --seed (a non-negative integer) and --minimum-quality (0 through 1) are also required for either generator. Minimum quality is a detector gate, not a measure of resemblance to your style.
- For example, train and evaluate an adapter in Skryba first, then use --style academic --language preserve --generator local with its adapter path and the checkpoint, device, precision, template and token budget used for that adapter. The same fields appear on Lem's paper AI text panel.
Output and state#
Runs `skryba --minimum-quality <q> rewrite - --generator <choice>` with the stated settings and prints JSON with state, provider, message and rewritten text. Lem does not claim that a detector-passing rewrite is in your voice; compare it to held-out personal passages using Skryba's evaluator.
Refusals#
- A missing or unknown generator is refused; each option requires a value of its documented type. More than one input or any unknown --option is refused as “humanize rewrite: unexpected argument <value>”.
- A missing setting is refused before Skryba runs: “Invalid humanization request: Skryba assumes no rewrite setting; state <names>”, including style and language. The local path also names missing checkpoint, adapter, device, precision, chat template or token budget. Passing an adapter with --generator brama refuses rather than silently discarding it. POST /ai-text/humanize and the desktop panel use the same request contract.
- Skryba refuses invalid numeric settings, missing adapter/checkpoint, unavailable Ster or detector, and generation failures with their actual causes. Lem refuses empty text, invalid UTF-8 on stdin and unreadable input files; an unreadable rewrite output names its path and read error, while an empty rewrite is refused separately.
- A failed standard-input read refuses with “Invalid humanization request: could not read standard input: <cause>”; empty standard input and invalid UTF-8 are refused before invoking Skryba. No partial or undecodable input is sent for rewriting.
- An absent PATH, empty or nonexecutable LEM_SKRYBA_BIN, or no executable skryba on PATH is named precisely. No checkout or home-directory path is searched in their place.
- A failed Skryba process names its exit status or signal and retains complete stderr. If that diagnostic file cannot be synchronized or read, the refusal names the stderr path and underlying cause.