# Illustrator

Transform text-heavy reports into visual narratives.

This is a tool for **attention management**. Reports compete for a reader's limited attention. Images break monotony, create emotional resonance, and guide the eye through a story arc. A well-illustrated report doesn't just inform — it creates a *feeling* and tells a *story*.

## Pipeline

**analyze** (LLM reads HTML → suggests image slots) → **generate** (create images) → **inject** (insert into HTML)

A **review page** is always generated alongside, showing all stages with tabs: Original → Slots → Gallery → Result — so you can debug and iterate.

## Usage

```bash
python -m rivus_present.illustrator report.html                    # full pipeline
python -m rivus_present.illustrator --analyze-only report.html     # just plan (JSON)
python -m rivus_present.illustrator --inject manifest.json report.html  # inject only
python -m rivus_present.illustrator --slots-file slots.json report.html  # skip analysis, use edited slots
```

## Output

```
report_illustrations/
  images/           # generated PNGs per slot
  manifest.json     # slot → image mapping with metadata
  review.html       # tabbed review page (Original / Slots / Gallery / Result)
report-illustrated.html   # the final report with images injected
```

## Image generation

Uses `lib.llm.image_gen.generate_image()` — costs logged to `~/.coord/llm_costs.db` alongside text LLM calls (model prefixed `image/...`).
