clean-user-facing-text
Clean user-facing text
Apply a final text-hygiene pass to prose the user owns or is authorized to process. Treat Unicode cleanup as deterministic and statistical-watermark reduction as best-effort; never claim that a rewrite proves human authorship or is undetectable. Preserve required academic, legal, platform, and regulatory disclosures.
Workflow
-
Identify the prose that readers will see.
-
Protect non-prose spans:
- fenced and inline code
- commands, paths, URLs, identifiers, API names, and exact values
- formulas, citations, and text the user asks to quote verbatim
-
Preserve every claim, fact, number, name, citation, and requirement. Never invent a detail, name, number, quote, or source to make the prose easier to write or more varied: if a fact is missing, flag the gap rather than fill it. The rewrite may sharpen, compress, or reorder, but it may not add or remove claims.
-
Measure before. Inspect and score the input with the vendored zero-LLM stylometry estimator (see Scoring) and record the score. Read the report's
density_tier: rewrite only when it ishigh; forlowormedium, verify the text and otherwise leave the text unchanged. For a flag-only audit that never rewrites, use--audit:PYTHON "$SCRIPTS/inspect_text.py" --stylometry --json INPUT PYTHON "$SCRIPTS/inspect_text.py" --audit INPUT # detect-only: lists flagged spans, no rewrite