@model PlotLine.Models.ParagraphWorkspaceModel
@{
ViewData["Title"]="Manuscript structure and evidence";
var state=Model.State;
var scenePositions=state.Paragraphs.Where(p=>p.Story&&p.SceneId.HasValue).GroupBy(p=>p.SceneId!.Value).ToDictionary(g=>g.Key,g=>g.Min(p=>p.Occurrence.Ordinal));
var current=state.Scenes.Where(s=>!s.Retired).OrderBy(s=>scenePositions.GetValueOrDefault(s.Id,int.MaxValue)).ToArray();
var currentPage=Math.Clamp(Model.Page,1,Math.Max(1,(state.Paragraphs.Count+99)/100));
var evidencePage=Math.Clamp(Model.EvidencePage,1,Math.Max(1,(state.Evidence.Count+19)/20));
var rows=state.Paragraphs.Skip((currentPage-1)*100).Take(100).ToArray();
}
Word remains the source of your prose. These tools organise saved paragraphs and story evidence; they never edit your Word document.
@if(Model.Message!=null){
@Model.Message
}
@if(state.Paragraphs.Count==0){
Import your manuscript from Word
Companion 1.0.0.18 establishes paragraph identities and scene mappings automatically during manuscript import. Once it finishes, this workspace contains your scenes and story evidence.
Some scene groupings need review. Their latest Word paragraphs are saved below; existing scene prose is retained until you confirm or adjust the grouping. Uncertain passages are not used as verified story evidence.
Save/reconnect mode explicitly permits manuscript updates from this book's associated Word document. Only changed prose is transmitted when the agent has a matching snapshot. It never starts AI analysis.
A different Word manuscript must be imported into a separate book. This preview never guesses evidence identity across documents.
Scenes
Split at a paragraph or move a boundary using the paragraph list. Move prose and reorder scenes in Word, then synchronise.
@foreach(var scene in current){var sceneIndex=Array.IndexOf(current,scene);var adjacent=sceneIndex+1@scene.Title @if(scene.NeedsRefinement){Needs refinement}
Page @currentPage of @Math.Max(1,(state.Paragraphs.Count+99)/100). Paragraph numbers describe this saved snapshot, not permanent identities.
@foreach(var row in rows){var scene=current.FirstOrDefault(s=>s.Id==row.SceneId);
Paragraph @(row.Occurrence.Ordinal+1) · @(scene?.Title??(row.Occurrence.Outline!=1&&row.ChapterId>0?"Scene unresolved in this chapter":"Heading / front matter")) @if(!row.PositionVerified&&(row.Story||(row.Occurrence.Outline!=1&&row.ChapterId>0))){ · Position needs review}