# Inkhaven 1.3.7 — Close the loop: AI rewrite-in-place

_On top of 1.3.6. The Editorial Pass *found* every problem and *jumped* you
to it — but the fix was still all manual. 1.3.7 turns the cockpit from a
navigator into an actor: `f` on a rewritable finding streams an AI rewrite
of the located passage, which you accept (snapshot-gated) or reject. Full
plan: [EDITORIAL-2_PLAN.md](../PROPOSALS/EDITORIAL-2_PLAN.md)._

## Headline

The cockpit could drop your cursor on a flat sentence, an echo cluster, an
overlong paragraph — and then you were on your own. For the prose-level
findings, the AI can now propose the fix.

## `f` — rewrite-in-place

In the **`Ctrl+V Shift+R`** cockpit, a **`✎`** marks the rewritable findings:

- **echo** — rewrite the paragraph to vary the over-repeated word.
- **pacing** — tighten an overlong paragraph.
- **show-don't-tell** — rewrite a telling passage to show (new in 1.3.7 — see
  below).

Press **`f`**: it opens the finding's paragraph, streams a category-specific
rewrite into the AI pane, and pops the **diff review** — the same one the
1.2.11 sentence-rhythm rewrite uses. **`a`** snapshots the paragraph (the
original is one `F6` away) then replaces it; **`r`** discards. The judgment
categories (structure, continuity, a fact contradiction, a weak scene) stay
jump-only — there's no honest single-paragraph rewrite for "the midpoint
sags."

The rewrite prompt resolves through the usual three tiers (an
`editorial-fix-<category>` entry in the Prompts book → `prompts.hjson` →
built-in, multilingual), so the rewriting voice is yours to tune.

## Show-don't-tell joins the worklist

The marquee rewritable category wasn't yet an `edit` finding — show-don't-tell
lived only as a live editor overlay. 1.3.7 surfaces it: the same regex
detector now runs over every paragraph in `inkhaven edit`, emitting a
`show-tell` finding per telling phrase with a paragraph + char-range location
— jumpable and `f`-rewritable. No new detection; the regex already shipped.

## Under the hood

- Zero new dependencies — the rewrite reuses the shipped
  rewrite→diff→snapshot machinery; the new findings reuse the overlay's
  regex.
- The `pending_rhythm_rewrite` flag generalized to `pending_rewrite_diff:
  Option<String>` (the snapshot annotation), so each rewrite snapshots under
  its own label.
- New pure, unit-tested code: `editorial::fix_spec` / `rewritable`, the
  show-tell paragraph mapper.
- Tests 1326 → 1328. Tutorial 68 refreshed.

## Deferred (later cuts)

- **Span-scoped rewrite** — `f` rewrites the whole paragraph; rewriting only
  the flagged phrase (and splicing it back) is a refinement.
- **Filter-words** as an editorial category — the same surfacing as
  show-don't-tell, held back to keep the worklist's signal-to-noise high.
- **Batch "fix all of category X"** — one finding at a time.

## Carryovers (still open)

- **The Whole-Book AI Editor** (RAG over the whole manuscript) → 1.4+.
- **1.2.20:** ePub inline images + popup footnotes.
- PDF follow-ups: N-up / booklet quick-impose presets; CMYK-JPEG grayscale.
- A TUI `edit --deep` trigger; sixth supported language; GitHub Release
  backfill for 1.2.11–1.2.19.
