PlotDirector/docs/story-intelligence/single-system-runtime.md

2.7 KiB

Story Intelligence Single-System Runtime

Story Intelligence uses one production architecture:

Core Import -> canonical Project/Book/Chapter records -> canonical Scenes -> SceneManuscriptSources -> Scene Intelligence analysis -> retained raw Scene Intelligence results -> deterministic candidate preparation -> persisted review candidates/evidence -> Review Centre -> persisted candidate page GETs -> persisted decisions -> canonical materialisation.

Raw Scene Intelligence JSON is source and audit data. Normal review GET requests must not parse it. Scene JSON may be read only by the deliberate preparation/materialisation path or by explicit reanalysis.

Sources Of Truth

Concern Authoritative Persisted Source
Scene text SceneManuscriptSources
Scene analysis audit StoryIntelligenceSceneResults
Entity review preparation StoryIntelligenceReviewCandidateGenerations
Entity review candidates StoryIntelligenceReviewCandidates
Entity review evidence StoryIntelligenceReviewCandidateEvidence
Entity review completion StoryIntelligenceBookPipelines.*ReviewCompletedUtc
Plot/Thread review candidates StoryIntelligenceNarrativeCandidates
Plot/Thread evidence/events StoryIntelligenceNarrativeCandidateEvidence, StoryIntelligenceNarrativeCandidateEvents
Metrics SceneMetricValues
Review Centre tiles StoryIntelligenceReviewCentre_GetSummary

Candidate Preparation

Candidate preparation is deliberate server work. It reads retained Scene Intelligence results, applies the module generator, and stores the resulting candidate page payloads and compact evidence. Preparation creates a current generation per Book and module.

Characters are prepared after scene import/materialisation. After Character Review completes, peer candidates are prepared for Locations, Assets, Relationships, and Knowledge. Whole-book Plot synthesis remains the only final Plot/Thread candidate generator.

Review GETs

Normal detailed review GETs perform:

authorization -> compact review frame -> StoryIntelligenceReviewCandidate_ListPage -> ViewModel -> Razor.

They do not call candidate generators, do not call GetProgressAsync, do not call ResumeBookAsync, do not call EnsureCandidatesAsync, and do not read StoryIntelligenceSceneResults.

Failure

If a current generation is missing, preparing, or failed, review pages show no generated candidate rows from a fallback path. The fix is deliberate preparation or retry, not silent Scene JSON reconstruction during page render.

Removed In Phase 27D

Normal review GETs no longer use the transient Scene-JSON-backed entity candidate rebuild path. Those builders remain reachable only as candidate preparation/materialisation generators.