Continuity and health
get_timelineorders scenes and events bystory_time.order, optionally for oneentityor a range. Story order is not manuscript order.get_journeyfollows one character: each scene they are in, where, with whom, first meetings, how long they were gone, and whom they never meet. Use it before writing what a character knows or feels about someone: check that they have actually met.get_downstreamlists everything an event leads to throughcausesties: check it before suggesting a change to the plot.path_betweenshows how two pages are connected, or that they are not.get_contextfor a scene shows who and what is present, the relationships valid at that story time, and prior events: the fastest way to check whether a scene agrees with the book.lint_graphis a deterministic check of the whole book: links to pages that do not exist, duplicate titles, orphan pages, scenes with no chapter or no story time, a character in two places at once, comments whose passage is gone, scenes not yet processed. Same input, same answer. Filter withmin_severity.get_flagslists open continuity flags, raised by the system or by agents.
When you find a contradiction, do not fix the prose. raise_flag with a message the author can act on (what disagrees with what, quoting both sides), the nodes involved, and quotes: the exact words on each page, so the page opens on them with the flag marked (a flag with no words to point at is hard to find and easy to ignore), and if a passage is at fault, comment (action add) on it. resolve_flag only once the underlying problem is really gone.
Missing facts are fixed at the source: set a scene's story_time or pov with update_node, put a scene in a chapter with a contains edge, create the missing page a link points to.