On this page
Chunk
A chunk is the unit Skryba rewrites and selects independently. --max-words-per-chunk sets its whitespace-word budget; the default is 400.
Construction
src/humanizer.rs first splits input on exact blank-line (\n\n) paragraph boundaries and trims empty pieces. A paragraph within the budget stays whole. A larger paragraph is split into consecutive groups of at most the configured number of whitespace-delimited words. Skryba then accumulates those pieces into chunks, preserving blank lines between pieces while the combined word count still fits.
The resulting chunks retain text order. The final rewrite joins selected chunk texts with \n\n.
Lifecycle
For each chunk Skryba:
- samples strategies from the policy;
- generates
--candidatesrewrites through Brama; - scores and quality-checks every candidate;
- selects one candidate or the source fallback;
- records the source, selected candidate, all generated candidates, and fallback flag in
chunks[].
No candidate crosses a chunk boundary. Facts and qualifications that depend on another chunk are therefore the caller's responsibility when choosing a small limit.
Invariants
--max-words-per-chunk 0is refused withmaximum words per chunk must be positive.- A non-empty input yields at least one chunk.
- Source order is preserved.
- Every result chunk has exactly one selected candidate.
used_source_fallback: truemeans no generated candidate passed the quality gate and the original chunk was selected.
The desktop Rewrite view constrains this setting to 50–2,000 words in steps of 50; the CLI itself accepts any positive integer.
Maintained as part of the website-owned Skryba documentation corpus.