# Continuity Explorer

## Overview

The Continuity Explorer is a dedicated tool within PlotDirector designed
to allow authors to visualise and trace the state of their fictional
world throughout a story.

Unlike the existing Scene Inspector, which focuses primarily on editing
the current scene, the Continuity Explorer provides a global view of how
Characters, Assets, and Locations evolve over time.

The goal is to answer questions such as:

-   Where is the murder weapon at this point in the story?
-   Which characters have been inside the library?
-   Who possessed the diary before Beth found it?
-   What was the state of the world during Scene 42?
-   Are there continuity issues caused by characters or objects
    appearing in impossible locations?

This feature is particularly valuable for mysteries, thrillers, fantasy
novels, historical fiction, and any work involving large casts or
numerous interconnected locations.

## Objectives

The Continuity Explorer should allow authors to:

-   View the complete story state at any point in the timeline.
-   Track the movement of characters between locations.
-   Track the movement and ownership of assets.
-   Examine the history of individual characters, assets, or locations.
-   Identify continuity problems before publication.
-   Reduce reliance on external notes and spreadsheets.

## Core Concepts

### Story State

Story State represents the author's current understanding of the
fictional world at a particular scene.

If an entity has not explicitly moved since its last appearance, its
previous state is assumed to remain valid.

#### Explicit State

The entity's state was directly set within the selected scene.

Examples:

-   Beth enters the kitchen.
-   The revolver is placed inside the desk.

#### Inferred State

The entity has not been updated since an earlier scene.

Examples:

-   Beth remains in the kitchen.
-   The revolver remains inside the desk.

The last scene in which the state was explicitly confirmed should always
be displayed.

## Access Points

### 1. Scene Inspector Integration

A new tab should be added:

**Story State**

Purpose:

Provide immediate continuity information while writing.

This view is scene-specific and read-only.

### 2. Continuity Explorer Page

A dedicated navigation item:

**Continuity Explorer**

Purpose:

Allow detailed investigation of continuity throughout the project.

## Filter Panel

Users may filter by:

-   Characters
-   Assets
-   Locations

Multiple types may be selected simultaneously.

### Scene Range

Options:

-   Entire Project
-   Specific Book
-   Specific Chapter
-   Custom Scene Range

### Display Mode

#### Full Timeline

Display every scene.

#### Changes Only

Display only scenes where the selected entity changed state.

## Views

### Story State View

Answers:

"What does the world look like at Scene X?"

Displays:

-   Characters and locations
-   Assets and ownership
-   Locations with occupants and contents

### Character Journey View

Answers:

"Where has this character been?"

Supports:

-   Table view
-   Timeline view

### Asset Journey View

Answers:

"Where has this object been?"

Supports:

-   Table view
-   Timeline view

### Location Activity View

Answers:

"What happened in this location?"

Shows:

-   Characters present
-   Assets present
-   Changes over time

### Combined Tracking View

Allows multiple entities to be displayed together to reveal
relationships and continuity issues.

## Visual Timeline View (Future Enhancement)

Provide a horizontal timeline showing movement patterns.

Example:

SCENE →

Beth: Bedroom → Kitchen → Library → Study

Knife: Library → Beth → Evidence Locker

Diary: Library → Study

## Continuity Warnings (Future Enhancement)

Potential warnings include:

-   Impossible movement
-   Asset discrepancies
-   Multiple locations
-   Missing states

## Technical Requirements

Story State calculations should be generated dynamically.

Initial implementation should reuse existing:

-   Character Appearance records
-   Asset State records
-   Scene chronology

For each selected scene:

1.  Identify all Characters, Assets, and Locations.
2.  Search backwards through prior scenes.
3.  Retrieve the most recent explicit state.
4.  Carry state forwards until superseded.
5.  Mark whether the displayed state is Explicit or Inferred.

## Performance Considerations

Large projects may contain:

-   100+ Characters
-   500+ Assets
-   Thousands of Scenes

Potential optimisation:

Pre-compute continuity snapshots during project save operations.

## Phase 1 Scope

### Included

-   Story State tab within Scene Inspector
-   Continuity Explorer page
-   Character Journey View
-   Asset Journey View
-   Location Activity View
-   Combined Tracking View
-   Changes Only filtering
-   Explicit/Inferred state indicators

### Excluded

-   Automatic continuity warnings
-   Visual movement diagrams
-   Snapshot persistence
-   AI continuity suggestions

## Expected Benefits

Authors gain immediate visibility into their fictional world.

Continuity errors become easier to identify.

Complex mysteries become significantly easier to manage.

PlotDirector moves beyond planning software and becomes an active
continuity assistant.

The Continuity Explorer transforms PlotDirector from a repository of
information into a system capable of understanding and tracking the
evolving state of a story.

Rather than asking:

"Where did I write that?"

Authors can ask:

"Where was everyone and everything when this happened?"
