# Inkhaven 1.2.21 — The Facts book

Early on, an author collects research in **Notes** and **Research**. But
the *invariants* of a world — it's equatorial, no winter; the capital is
three days' ride inland; the war ended a generation ago — are a different
kind of thing: the ground truth every chapter must stay consistent with.
1.2.21 gives them a dedicated **Facts** system book and wires the AI to
treat it as the authoritative reference, end to end: collect facts,
interrogate them, check prose against them, and sweep the whole
manuscript for contradictions.

Tests 1160 → 1169. Zero new Rust dependencies — Facts reuses the existing
store, embeddings, AI-stream, and wiki-link stack. One new tutorial
([63](../Tutorials/63-facts-and-fact-checking.md)).

## The Facts book

Every project now has a **Facts** system book alongside Notes and
Research — free-form prose, no schema. Write a paragraph per fact (or per
topic). Don't want to start from blank? **`inkhaven facts init`** scaffolds
the usual categories (Climate, Geography, Seasons, Chronology, Culture,
Rules) as fill-in-the-blank paragraphs — idempotent, and `--genre
fantasy|scifi|mystery|historical` appends genre-specific categories
(magic system, FTL/physics, suspects & alibis, anachronism watch, …).

## Writing against your facts

**Facts AI scope (`F9`).** The AI scope cycle gains a **Facts** stop
(after Book). Enter it and the chat seeds a fact-analysis session: every
fact loaded as a visible prologue, the model framed as a grounded
fact-checker. It's *sticky* (stays active across follow-ups) and always
runs **Local** (your facts are the ground truth, regardless of F10). Edit
the Facts book and re-cycling F9 **refreshes** the loaded set.

**Fact-check chord (`Ctrl+B Shift+X`).** A one-shot check of the open
paragraph against the Facts book — the scope is locked to the local
paragraph, the verdict streams in as `claim | fact | detail` lines, and
**`Ctrl+B Shift+J`** then cycles the findings, jumping the editor cursor
to each flagged claim. If you've wiki-linked the scene to particular
facts (`Ctrl+V A`), those lead the grounding.

**Facts search (`Ctrl+B Shift+S`).** A semantic-search modal — type a
query, mark the matching facts, and send just those into a targeted Facts
chat. The scalable path for a large Facts book: ground in the relevant
handful instead of the whole book.

## Sweeping the manuscript

**`inkhaven facts scan`** walks every chapter, retrieves the facts
relevant to each (semantic search, so a big Facts book stays cheap), and
flags contradictions — written to `.inkhaven/facts_scan.json`. `facts
list` re-dumps; `--json` on either feeds a CI gate.

**`inkhaven facts extract`** solves the cold-start: an AI pass reads the
manuscript, proposes the world-facts the prose implicitly establishes,
and — after an interactive `y/N/a/q` review (deduped against what you
already have) — writes the accepted ones into the Facts book. `--dry-run`
to preview, `--yes` to accept all.

## Provenance and dependents

A Fact is just a paragraph, so it joins the wiki-link system across books:
`Ctrl+V A` links a Fact to its **Notes/Research** source (provenance) or a
scene to the facts it relies on; `Ctrl+V K` on a Fact shows every scene
that depends on it (dependents to re-check when a fact changes). An opt-in
status-bar chip (`editor.show_facts_chip`) shows the Facts-book entry
count at a glance.

## Multilingual

Every AI surface — the Facts-scope framing, the fact-check, the scan, and
the extract prompts — ships in English, Russian, German, French, and
Spanish, selected by the project's `language`.

## Config keys added

| Key | Default | Purpose |
| --- | --- | --- |
| `editor.show_facts_chip` | `false` | Show the `⚑N` Facts-count chip in the status bar. |

New CLI: `inkhaven facts scan` / `list` / `extract` / `init`. New chords:
`Ctrl+B Shift+X` (fact-check), `Ctrl+B Shift+S` (Facts search), `Ctrl+B
Shift+J` (next finding); `F9` gains a **Facts** scope. See
[`KEYBINDING.md`](../KEYBINDING.md) and
[Tutorial 63](../Tutorials/63-facts-and-fact-checking.md).
