On this page
Rewrite
A rewrite is Skryba's complete detector-directed transformation of one input text. It is not a single model response. Skryba generates several candidates for each chunk, measures every candidate with the configured detector ensemble and the quality judge, then selects the least detectable candidate that still passes the quality gate.
Shape
skryba rewrite --json and --report serialize a RewriteResult:
text: selected chunk texts joined with a blank line;chunks[]: the source chunk, selectedCandidateScore, all generated candidates, andused_source_fallback;- each candidate: strategy index and name, text, ensemble
ai_probability, weightedquality_score,quality_passed, full quality evaluation, and per-detector results.
The complete wire field list is in the CLI reference.
Lifecycle
- Reject empty input, a zero candidate count, a zero chunk limit, temperature outside
0..=2, or minimum quality outside0..=1. - Split the input into chunks.
- For each chunk, sample
--candidatesstrategy indices from the policy, using--seed. - Ask Brama's generator model for one rewrite per sampled strategy.
- Score all generated candidates with every configured detector.
- Ask the Brama-backed quality judge to evaluate all candidates.
- Keep only candidates whose six quality dimensions meet their thresholds and whose
critical_erroris false. - Select the survivor with the lowest
ai_probability. If none survives, score the original chunk and select a syntheticsource-fallbackcandidate. - Join selected texts. Print text or JSON and optionally write
--outputand--reportfiles.
Candidates are processed chunk by chunk. Detector calls for a candidate set run concurrently, while each detector still enforces its own interval and cache.
Selection invariants
- Quality is a hard gate, not a ranking preference.
- Detectability decides only among quality-passing candidates.
- A detector failure fails the rewrite; Skryba never changes the ensemble silently.
- The original text is always available as the fallback, so a chunk is not replaced by a candidate that failed the quality contract.
--seedcontrols strategy sampling, not remote model determinism.--policyis loaded and validated; a missing or invalid policy is an error, not a fallback to the built-in policy.
Exact refusals
input text cannot be emptycandidate count must be positivemaximum words per chunk must be positivetemperature must be between 0 and 2minimum quality must be between 0 and 1BRAMA_TOKEN is required for Brama inference
The offline rewrite walkthrough shows a real selected plainspoken candidate and a complete score record.
Maintained as part of the website-owned Skryba documentation corpus.