---
name: cse-prose-rewrite
description: Rewrite, tighten, and contraction-check Slack, Jira, Confluence, email, longform, and local prose drafts so they read in the operator voice. Uses the local Gemma-4-E2B RotorQuant voice rewriter when its env is set up, the authoring rules by hand otherwise.
argument-hint: "<file-or-draft>"
---

# CSE Prose Rewrite

## Compact MCP routing (local-only exemption)

This rewrite workflow uses local scripts and files only. Do not substitute `cse_capabilities`, `cse_read`, `cse_apply`, `context_assemble`, or `cse_session_info` for the local rewrite or manual fallback.

Use this skill when the user asks to rewrite, tighten, contraction-check, or make a Slack/Jira/Confluence/email/longform draft sound like the operator. It runs local repo scripts and needs no MCP tools.

Two engines, in order of preference:

1. **The local voice rewriter** ([`scripts/voice/lora/`](../../../../../scripts/voice/lora/README.md)) -- the locked RotorQuant Gemma base plus voice LoRA rewrites the whole document, then the gpt-realtime-2 fact-restore script repairs factual drift while holding the voice. Use it when its environment is set up.
2. **The authoring rules by hand** -- the [`writing` skill](../writing/SKILL.md), [prose constitution](../../../../../docs/flows/voice-guard/prose-constitution.md), and [surface rubric](../../shared/prose-voice.md). This is the fallback when the model environment is unavailable and the judgment layer over model output either way.

## Generative rewrite (preferred)

Run the local rewriter from the repo root. It reads the whole document and rewrites it in one holistic pass.

```bash
# a draft file
./scripts/voice/lora/voice --file /path/to/draft.md

# inline or piped, with a surface hint
printf '%s\n' "$DRAFT_TEXT" | ./scripts/voice/lora/voice --surface slack
```

The gpt-realtime-2 pass restores facts against the source, and structure and length are free to change. You are still the final faithfulness check. Before you use a rewrite, read it against the source and confirm every fact survived and nothing was invented:

- every fact stated in the source
- every explicit ask
- every quote a named person said aloud, with its wording intact
- every identifier: name, @mention, number, date, URL, issue key
- every standalone directive or imperative sentence, at a paragraph, play, or move tail and mid-paragraph; a directive buried inside a multi-sentence paragraph is yours to catch
- the subject of every claim, unchanged: a claim must keep its subject and verb. "A specific thing we already pulled off beats the abstraction" must not become "doing its work beats the abstraction"; "Tell them how fast we move" must not become "We move fast"
- reported-speech verb fidelity: keep the source's attribution verb, so an "implied" must not become a "said"

Structure and length sit outside this check: the rewrite is free to restructure, merge, cut, reorder, and change length, so long as every fact above survives. If any fact is dropped or anything new was invented, do not ship the draft. Re-run the rewriter or fix the wording by hand, then check again. Present the final rewrite and note any manual touch-ups you layered on top. The gpt-realtime-2 fact-restore pass is the fact layer; the agent review is the final judgment layer over it.

First run on a machine needs a one-time setup (uv deps + the RotorQuant base model):

```bash
./scripts/voice/lora/voice setup
```

Before choosing the engine, run this non-network readiness probe from the repo root. It performs a disposable local inference, disables the network fact-restore pass, and fails when `uv`, the cached base, or the local runtime isn't ready. The pinned adapter must also resolve without the warning shown below:

```bash
probe_log="$(mktemp)"
if ! HF_HUB_OFFLINE=1 ./scripts/voice/lora/voice --no-fact-restore "Readiness probe." >/dev/null 2>"$probe_log" \
  || grep -q '^\[adapter\] could not resolve ' "$probe_log"; then
  # choose manual mode; do not run setup implicitly
  :
fi
rm -f "$probe_log"
```

If the probe fails, fall back to the manual flow below and tell the user they can enable the model with `./scripts/voice/lora/voice setup`. Never run setup as part of the probe. Setup, model layout, and design are documented in `scripts/voice/lora/README.md`.

## Manual rewrite (fallback + judgment layer)

Operating rules:

- Read the target draft before rewriting.
- Preserve facts, links, dates, identifiers, and explicit asks when they carry meaning on the target surface.
- For Jira comments, the issue page already supplies the issue key, customer name, status, and assignee. Drop a ticket key or customer name repeated from that same issue, plus routine Jira UI coaching or process narration.
- Use rhetorical contractions liberally: "do not" > "don't", "we have" > "we've", "it is" > "it's", "I am" > "I'm".
- Keep short operator prose direct: what changed, why it matters, and the ask.
- Do not invent @mentions or unresolved names.
- Do not include bot identity, Source blocks, permalinks, or ISO-date scaffolding in visible prose.

Flow:

1. Read the draft and identify the intended surface: Slack, Jira, Confluence, email, or longform note.
2. Read the linked `writing` skill and the relevant constitution or surface rubric, then rewrite only the user-facing prose. Leave quoted source material and structured identifiers intact.
3. Self-check against the constitution's zero-tolerance patterns (totalizing copular flourish, "the one ___" singling, second-person drift, abstract feeling-naming) and the contraction rules above.
4. Compare the rewrite against the source the same way as the generative path: confirm every fact, explicit ask, spoken quote, and non-redundant identifier survived, and that nothing was invented. A Jira issue key or customer name is intentionally dropped when the comment is attached to that same issue and needs no disambiguation. Add three checks: every standalone directive or imperative survived, at block tails and mid-paragraph; no claim was re-anchored onto a new subject or verb ("A specific thing we already pulled off beats..." must keep its subject and not collapse to "doing its work beats..."; "Tell them how fast we move" must stay a directive and not flatten to "We move fast"); and every reported-speech verb kept its force (an "implied" must not become a "said"). Structure and length may change freely. If any fact is dropped, re-anchored, or added, fix the wording and re-check before shipping.
5. Report the final draft and note any wording you left deliberately against the rules and why.
