5.8 KiB
Writing Context and Intent integration — 12 November 2026
The existing VSTO → Windows agent → native workspace redirect → Writing Context/Intent browser contract is retained. No native source, Companion version, installer, synchronisation algorithm, schema or manuscript data changes are included.
Findings and implementation
Context already had scene cards, people, relationships, maps, metrics and plot exploration. Intent already displayed saved scene purpose/outcome, chapter objectives, emotional direction, reader takeaway, continuity requirements, notes, checklist and explicitly requested assessment. Existing Story Point services already provided batched, chronological, verified knowledge and relationship histories.
Native launch previously fell back to the first scene when the request provided only a book and exact document session. Both Writing pages now resolve that exact user/book/instance/session. Chapter-capable sessions require accepted chapter-position evidence from the existing position stored procedure. Missing, unsaved, stale or disconnected mappings wait instead of choosing another scene. Native fragment requests carry the exact session and recheck acceptance after loading; concurrent changes return 409. The browser cancels older native requests on pending/disconnected mappings and retains the saved fragment with an explicit status.
Writing uses a read-only scene hydration path rather than loading the full editing form, manuscript statistics, storage quotas, suggestions or per-entity legacy state. Existing Timeline/editor callers retain their original model. Intent avoids chronological history queries entirely. Request-scoped tasks share repeated scene/projection reads; unchanged native observations do not fetch another fragment.
Context reuses Story Point's canonical narrative ordering and verified knowledge transitions, including earlier scenes and books. It prioritises the recorded viewpoint, limits initial knowledge and thread lists, ranks unresolved threads by current developments, character knowledge and chapter, and shows at most five established nearby scenes in the current book. A later narrative scene is excluded even if its story date is earlier. Historical relationships and other characters' knowledge are labelled author reference rather than viewpoint awareness. Reader knowledge is explicitly not independently recorded; missing viewpoint/knowledge is not inferred. Source links remain available. The full exploratory plot chart is identified as author planning, including future material.
Intent displays saved purpose types and clearly identifies the author plan and scene reference. Opening either page does not save, analyse, accept suggestions or rewrite author decisions. Project membership and existing authentication/subscription boundaries remain in place; new writing hydration authorises the owning project before scene workspace queries.
Validation
dotnet build PlotLine.slnx: passed, zero warnings/errors. This normal solution gate compiles its existing agent projects; no Windows VSTO package/version/installer was produced.- Full executable regression harness: passed (484 PASS lines, including nested checks).
- Focused
--writing-integration: 26 checks passed; exact scene/session resolution, saved Intent preservation, unauthorised scope, stale/unsaved/claimed mappings, concurrent revision changes, chronological knowledge/relationships, relevant threads, missing viewpoint, repeated task reuse and canonical scene order. - Focused
--writing-context-navigation: 30 checks passed, including exact-session commands, access, maps/metrics and no passive navigation feedback. - Chromium follow/recovery: passed native/legacy races, pending response cancellation, server 409 recovery, unverified mapping refusal, unchanged-scene deduplication and no passive Word commands/focus.
- Compiled Razor browser suites: Context shell/PWA and embedded layouts; navigation at three widths/four themes; people/plots/maps/metrics; Context/Intent saved plans and missing metadata; 400-scene chart fixture. The scale fixture retained one chart read across four scene changes (282 ms initial chart / 195 ms changes on this run).
- In-memory navigation projection: 48 chapters / 4,800 scenes in 3.0 ms, no SQL or Word. This is a projection measurement, not a live Discovery database or Word latency claim. The protected Discovery manuscript and accepted chapters were not modified.
Development delivery
Development release 1ad8e12-20261112T222515Z is installed from source 1ad8e12ca89627f4e13c335e84f5fcb5711d61cb. No database migration was required. The verified Development database had zero queued/active jobs across ten import/analysis/synthesis/enrichment status tables immediately before installation.
plotdirector-dev is active. Local and public HTTPS GETs returned 200 with normal TLS validation. Context and Intent returned the expected unauthenticated login redirects (302); their authenticated rendering and data/session contracts were exercised by the isolated compiled-page and controller regressions above, rather than a live author login. Published/deployed DLL SHA-256 hashes match, and the deployed assembly contains the source commit. Protected settings/data paths were preserved against the timestamped backup. There were no service warning/error entries or application failures. The existing HTTPS-port detection warning appeared on the local HTTP smoke request; public HTTPS passed normal TLS validation. Production was not changed.
Remaining Windows check
Use the already qualified Companion to open Context and Intent at two accepted scenes, including a cross-chapter move. Confirm the current scene and saved objectives, then edit/save and confirm pending-to-verified following. Atlas tests exercise the server/browser contracts and compiled pages; they do not automate real Word. No Companion upgrade is required for this integration.