# Inkhaven 1.4.2 — The Inner Editor (Part A)

_The second member of the **Inner family** arrives. Where Inner Socrates interrogates facts
and structure through Reader Personas, **Inner Editor** observes *literacy and style* through
a single configurable persona — reading your prose paragraph by paragraph and offering brief,
grounded, **non-prescriptive** observations: richness, tautology, style, vocabulary, belief
stance, craft praise, suggestions. Built entirely on infrastructure already in the tree, with
**no new dependencies**. This is **Part A** — the editorial core (engine, surfaces, ambient);
the conversation mode, snapshot history, and Bund stdlib land in 1.4.3._

_Plan: [INNER_EDITOR-1_PLAN.md](../PROPOSALS/INNER_EDITOR-1_PLAN.md). Also in 1.4.2: Book-RAG
polish (below)._

## Inner Editor — observe, never prescribe

Engage the Editor on a paragraph and it returns observations across eight categories, each
graded **Praise / Note / Concern** and grounded in specific textual evidence:

```
✎ Concern [Vocabulary] 'silent' appears thrice with 'silence', 'walked'/'walking' — the
                       repetition may strain the palette if unintentional.
✎ Praise  [Craft]      The final sentence earns its weight through precise parallelism,
                       pairing the literal 'exact weight of a stone' with the 'heavier
                       truth' — the thematic turn feels earned, not imposed.
```

The discipline is structural, not optional: the Editor **never commands** ("should"/"must" are
not in its vocabulary — it offers "I notice", "you might consider", conditionally framed). **Praise
must be earned** — generic encouragement ("nice paragraph") is forbidden by prompt design. And
**silence is fine**: a paragraph with nothing notable draws nothing. It is not the Socratic reader
(it doesn't interrogate) and not the fact-checker (it doesn't check facts) — it attends to the
texture of the prose.

LLM-only, paragraph scope (the current ¶ + a small preceding window). It consults the shared
**intent ledger** — observations the author has already declared deliberate are suppressed. Findings
are **multilingual** (the contract ships localized EN/RU/ES/FR/DE; observations come back in the
paragraph's language), and the bundled prompt is overridable through the standard `Prompts`-book chain.

### Engaging it

- **`Ctrl+V O`** (O = *Observe*) opens the Inner Editor overview — status, tuning, today's usage,
  recent observations. From there: **`E`** engage the open paragraph, **`A`** toggle the ambient
  paragraph-pause auto-engage, **`F`** jump to the findings in Output.
- **Ambient auto-engage** is opt-in (off by default, like the other slow-LLM ambients): once on,
  a writing pause runs one engagement in the background, with a same-paragraph cooldown so it never
  fires mid-edit.
- Findings land in the **Output pane** with a **✎ glyph** and a warm-earth palette (muted gold /
  terracotta / deep ochre by severity), distinct from Inner Socrates' contemplative purple. Praise
  is hidden at the default `note` threshold (filter or list to reveal). Both Inner-family members
  coexist on the same paragraph and render distinctly.

### From the terminal

```sh
inkhaven inner-editor engage --paragraph <id>      # or --text "…"
inkhaven inner-editor findings list [--severity praise|note|concern]
inkhaven inner-editor config show
inkhaven inner-editor usage
```

### Tuning

A new `inner_editor:` config block tunes the single persona — `tone` (critical / balanced /
encouraging), `verbosity`, `praise_frequency`, `genre_aware` (+ a persisted project `genre`),
`belief_stance`, per-category enable/disable, the engagement idle/cooldown/context, the output
threshold, and the LLM caps. As everywhere in Inkhaven, **cost caps inform; they never block** —
the `inner_editor` budget surfaces in `inkhaven inner-editor usage`.

## Book-RAG polish

Two fixes to 1.4.1's "Chat with Your Book":

- **The conversation is now visible inline.** In Book scope the AI pane renders the running
  transcript (retrieved-passages panel + prior turns + the streaming answer), not just the latest
  reply. The transcript records your clean question, not the multi-thousand-token retrieval prefix.
- **Citations are readable paths, not UUIDs.** The citation token is now the passage's location
  path — `[chapter/scene]` — end to end (composed context, system prompts, validation, the
  `ink.book_rag.cited_ids` Bund word). UUIDs never reach the author.

## Dependencies & compatibility

**No external application or binary dependencies; no new runtime crates** — Inner Editor is built on
the existing per-feature DuckDB store, the PANE-1 Output pane, the multilingual prompt chain, the
intent ledger, and `ai::usage`. No on-disk shape moved; the `inner_editor:` block and project `genre`
are optional. Inner Editor is **Part A** — `inner-editor conversation`, snapshot history, the
`ink.inner_editor.*` Bund words, and the full genre set arrive in 1.4.3. Tests 1855 → 1875.
