# Inkhaven 1.3.5 — Scene craft: scaffold, sequel, second opinion

_On top of 1.3.4. The Planning Board gained a scene grain in 1.3.4; 1.3.5
deepens it — AI **scene scaffold** (propose a card from the prose), **sequel
cards** (the reactive counterpart to the proactive scene), and a tension
**second opinion** (an AI intensity reading beside the deterministic curve).
Full plan: [PLANNING-4_PLAN.md](../PROPOSALS/PLANNING-4_PLAN.md)._

## Headline

- **Scene scaffold** — the cold-start problem: the prose already implies the
  goal/conflict/disaster, so the AI proposes them. CLI and TUI.
- **Sequel cards** — Swain's structure alternates proactive *scenes* with
  reactive *sequels* (reaction → dilemma → decision). The Board now models
  both halves.
- **Tension second opinion** — the deterministic curve counts open
  obligations; an opt-in AI pass rates *felt* intensity. Two independent
  readings catch more than one.

## Scene scaffold

You shouldn't type a scene's goal/conflict/disaster from scratch when the
chapter already implies them:

```sh
inkhaven plan scene scaffold --chapter the-wharf   # one chapter
inkhaven plan scene scaffold --all                 # every cardless chapter
```

It reads the chapter prose, asks the LLM for the dominant scene's
goal/conflict/disaster (3-tier `plan-scene-scaffold` prompt), and upserts the
card. In the **`Ctrl+V Shift+K`** scene board, **`g`** regenerates the
selected card — the proposal streams into the AI pane, and **`L`** files the
parsed result back into the card (the same lift used for the structural
analysis).

## Sequel cards

A scene is proactive (goal → conflict → disaster); a **sequel** is reactive
(**reaction → dilemma → decision**) — the disaster lands, the character
reels, weighs bad options, and decides, setting the next goal.

```sh
inkhaven plan sequel add "Mara reels" --chapter the-wharf \
    --reaction "she's gutted" --dilemma "pay or expose her father" \
    --decision "pay it quietly and hunt the truth"
inkhaven plan sequel list      # or `plan scene list` for both, kind-tagged
```

One unified card model: `Scene` gains a `kind` field (old scene cards load
unchanged — no migration). The weak-card check flips by kind — a scene with
no disaster doesn't *turn*; a sequel with no decision *stalls* — and once
sequels are in use, two scenes back-to-back flag the first's unprocessed
disaster. `plan check`, the `v` board, and `plan analyze` all show both
kinds.

## Tension second opinion

The 1.3.4 actual line is deterministic (open-obligation density). For an
independent reading:

```sh
inkhaven plan tension rate     # AI-rate each chapter's intensity 0–100
```

`plan check`'s TENSION section gains an `ai` column and the overlay a third
sparkline, so you compare three readings — **expected** (framework),
**actual** (obligations), **ai** (felt):

```
TENSION (expected vs actual vs ai intensity)
  Midpoint            expected  65%  actual  33%  ai  35% ⚠ flat
  Climax              expected 100%  actual 100%  ai  95%
```

When actual *and* ai both land low where the framework wants a peak, that's
two independent signals agreeing the middle sags. The ratings are cached
(`.inkhaven/tension-ai-<book>.json`, content-hash invalidated); the
deterministic curve stays the default, the `ai` line is opt-in.

## Under the hood

- Zero new dependencies — scaffold + the AI rating reuse the LLM stack;
  sequel cards reuse the scene write-back; the second-opinion line is a
  sidecar + a third sparkline.
- New pure, unit-tested helpers: `parse_scene_scaffold`, `parse_intensity`,
  the kind-branched `analyze_scenes` / `scene_body`, `AiTensionCache`.
- Tests 1317 → 1321. Tutorial 67 refreshed.

## Deferred (later cuts)

- **Multi-scene chapters** — scaffold proposes one card per chapter; splitting
  a chapter into several cards by scene break (`#`) is a later refinement.
- **Per-scene AI tension** — the second opinion is per-chapter.
- **The Whole-Book AI Editor** — still 1.4+.

## Carryovers (still open)

- **1.2.20:** ePub inline images + popup footnotes.
- **Facts follow-ups (1.2.21):** internal-consistency check, series-shared
  facts.
- PDF follow-ups: N-up / booklet quick-impose presets; CMYK-JPEG grayscale.
- Sixth supported language; GitHub Release backfill for 1.2.11–1.2.19.
