13 KiB
Writer 3.0 Phase 1 — delivery and Development qualification
Date: 16 November 2026 (London). Shared branch: codex/word-companion-native-phase1-20261104.
Implementation and deployed source: c769e1119a2542e256374db3c48eeb324c2663ab. The following documentation/test-only commit records final live acceptance; it does not change the deployed application binary. Phase2 has not begun.
Delivered foundation
- Added migration264 to reconcile the live readiness-only queue procedure with current canonical queue requests. Optional BookID reaches SQL before TOP40, including default dashboard book selection. Existing legacy queues, subtitle output and ordering remain compatible. Queues remain bounded at40 scenes per selected book; Help explains the bound.
- Intent Checklist now displays the scene's canonical Revision Status through its existing lookup. Legacy DraftStatus/readiness fields are retained. Live synthetic verification: canonical Outlined with legacy Planned still stored. No status backfill or manuscript-data conversion.
- Introduced immutable shared context/selection projections with separate scope, saved objective, working, exploration, pinned, Reader, session and verified Word slots. Dashboard, resolved reference page models and Reader use adapters; reference-role metadata is emitted. Construction is not authorisation or a navigation command. Existing entity access, exact native document/lease/accepted-position validation and race checks remain authoritative. Unresolved scene URLs cannot become valid pinned selections. Active sessions retain the existing UUID/activity/chapter/native binding and polling rather than following a global selector.
- Book/project scope is preserved by plan-list preview links and activation/deactivation/deletion/legacy-regeneration returns. Preview filters plans before choosing its default, includes All Books plans, and rejects an explicit out-of-scope plan. Empty scoped previews retain book context. Rebalance GET reuses the normal preview loading path so reviewed allocations remain available; no premature replacement of either scheduling store.
- Setup/edit validation partials now load in the Scripts section after layout jQuery. Queue terminology matches In Progress/Final Pass. Sparse Context messages no longer falsely claim a supplied book ID was missing.
- Existing Help architecture reused: corrected workspace/queue/goal articles, new working-context and plan articles, existing tag-helper icons on affected surfaces, and a 62-unit Help ownership register.
- Permanent eight-phase tracker includes implementation batches, reuse/data/dependency/risk/test/Help/deployment gates, explicit mapping of all62 features and96 interaction families, and Writer2 reconciliation. Timed sprints, richer passes, collaborator assignments and signed provenance remain honestly recorded as outstanding requirements rather than silently retired.
Files and components
| Component | Changed files |
|---|---|
| Context contract | PlotLine/Services/Writer/WriterContext.cs; context/dashboard/preview models in PlotLine/ViewModels/CoreViewModels.cs; Reader adapter in Services/Manuscript/ManuscriptReaderService.cs |
| Queue and plan plumbing | PlotLine/Controllers/WriterController.cs, PlotLine/Services/CoreServices.cs, PlotLine/Data/Repositories.cs, PlotLine/Sql/264_WriterFoundationQueues.sql |
| Reference verification/projection | PlotLine/Controllers/WritingController.cs; Views/Writing/Context.cshtml, Intent.cshtml, _WritingIntentChecklist.cshtml |
| Existing Writer surfaces | Views/Writer/Index.cshtml, _WriterSceneQueue.cshtml, WritingPlans.cshtml, ScheduleSetup.cshtml, SchedulePreview.cshtml, EditWritingPlan.cshtml |
| Regression protection | PlotLine.Tests/WriterFoundationTests.cs, WritingIntegrationTests.cs, harness registration in Program.cs, Sql/WriterFoundation.sql, Browser/writer-foundation-live.cjs |
| Help | PlotLine/Help/Articles/Workspace/{Overview,WriteNext,RevisionQueue,PolishingQueue,ChapterGoals,WorkflowSummary,WorkingContext,WritingPlans}.md |
| Programme documentation | Docs/Writer/Writer3/{Master-Specification,Implementation-Tracker,Context-Contract,Help-Coverage,Phase1-Report}.md and sanitised acceptance evidence |
No native add-in/agent/protocol code, styles, production settings or author story semantics changed. The unrelated untracked CanonicalManuscriptArchitectureAssessment document was preserved.
Database qualification
Effective Development configuration was parsed privately with SqlConnectionStringBuilder and DB_NAME verified as PlotDirector_Development. Before writes/migration, a fresh copy-only checksum backup succeeded and its nonempty container file was checked:
/var/opt/mssql/backup/writer3-before-264-20261116-phase1.bak
An earlier optional RESTORE VERIFYONLY attempt was refused because the application SQL account lacks CREATE DATABASE permission. No privilege escalation, restore/reset or database overwrite was attempted. Backup command completion/file existence is verified; a restore test is not claimed.
Applied only264, with ANSI_NULLS and QUOTED_IDENTIFIER enabled. It changes one procedure and adds no tables, columns or destructive migration. Earlier numbered migrations remain unchanged. The old application remains compatible with the optional parameter and retained queue names.
PlotLine.Tests/Sql/WriterFoundation.sql ran against verified Development inside a transaction and rolled back. It established45 scenes in another book cannot exclude the selected-book target, the selected-book cap remains40, all four canonical statuses map correctly, and legacy Blocked still works. Follow-up metadata verified BookID scope and zero remaining transactional fixture projects. Fixtures contain no actual author manuscript.
Automated and browser results
| Gate | Command / coverage | Result |
|---|---|---|
| Build | dotnet build PlotLine.slnx --no-restore |
Exit0;0warnings/errors |
| Full harness | dotnet run --no-build --project PlotLine.Tests/PlotLine.Tests.csproj |
Exit0;543 PASS records, no FAIL records; includes new context/queue/plan tests plus existing native auth, manuscript, intent, activity and security regressions |
| Standalone windows | node writer-workspace.cjs |
Browser/simulated PWA pass: initial failure/retry, per-window identity/reuse, selected-book isolation, denied/unavailable display API and plan navigation |
| Native-follow simulation | node writing-context-follow-recovery.cjs |
Pass: exact-session queries, pending/invalid mappings, races/cancellation, cross-chapter updates and trusted explicit navigation; simulated protocol, not Word |
| Reader | node manuscript-reader.cjs |
Pass: real Razor/controller, escaped text, chapter navigation, empty state, timestamps, private headers, account isolation, GET-only, focus;3widths×4themes×browser/PWA |
| Intent | node intent-assessment.cjs |
Pass: explicit assessment/saved-result load/cancellation/scene isolation/permission feedback with isolated fixtures; no paid production AI execution |
| Chapter goals | node writer-goal-navigation.cjs |
Pass: unsaved guard, cancel/discard, antiforgery saves, Unicode, save-and-leave failure/retry/concurrent edits; browser/PWA |
| Work/audio UI | node writer-intelligent.cjs |
Pass:4themes,2widths,browser/PWA; fixed-rule suggestions, session start/end/note, periodic controls, seeks/stale/recovery under simulated media, month/year activity |
| Dashboard | node writer2-dashboard.cjs |
Pass:48theme/viewport/history/PWA combinations; navigation, selected book, empty states and chart links |
| Live post-deployment | PD_WRITER_FOUNDATION_IDENTITY=<private fixture file> node PlotLine.Tests/Browser/writer-foundation-live.cjs |
Browser and simulated PWA pass; sanitised observations |
Isolated browser tests used the existing loopback fixture host, never the deployed Production service or database. The live test used normal Development login and only dedicated disposable entities. It exercised four populated queues, pinned canonical status, empty-book entry, real setup/confirmed allocations, scoped/empty Preview, activation/deactivation returns, out-of-scope plan404, incomplete native-session400, empty Reader, and validation load without JavaScript errors. Help microcontent and browser popup, PWA contextual ribbon/drawer and full article GET were checked. Initial test iterations were corrected to target promoted PWA Help and wait for its asynchronous content; no application failure was hidden.
The synthetic owner/projects/books/scenes/plans were removed using guarded existing project/account deletion procedures. Final query returned RemainingSyntheticAccounts=0; the temporary credential file was removed. The transactional queue fixture also left no rows. No real manuscripts were used for writes.
Development deployment
Release: c769e11-20261116T151427Z.
- Fresh Release publish archived at
/srv/apps/plotdirector-dev/releases/c769e11-20261116T151427Z. - No queued/processing Story Intelligence jobs, active core imports, synthesis or character enrichment found before service stop; existing states were Complete/Completed.
- Prior physical current directory retained at
/srv/apps/plotdirector-dev/current-before-c769e11-20261116T151427Z. - Replaced Development current via rsync while stopped, preserving appsettings, environment files, App_Data, uploads and logs. Ownership restored; service restarted.
systemctl is-active plotdirector-dev: active. Local GEThttp://127.0.0.1:5050/:200. Public TLS-validated GEThttps://dev.plotdirector.com/:200.- Published/deployed PlotLine.dll SHA256 both
7ebc3af6895af46d6be2e353f6d9c3595796fb9023fbe7852f743caeb3ee2a39. - Deployed informational metadata:
1.0.0+c769e1119a2542e256374db3c48eeb324c2663ab. - Recent warning/error journal clear. Authenticated changed-route acceptance passed after deployment.
The initial nonprivileged deployed-file hash check was permission denied; it was repeated successfully with sudo. Deployment itself succeeded. Application rollback can use the retained prior directory without reversing264; optional BookID and legacy queue support retain compatibility. Production was not touched.
Limitations and bounded follow-up
Physical Windows Word, installed Windows PWA, actual ElevenReader playback/Pause on Edit latency, and monitor placement have not been tested on Atlas. Existing protocol/fixture regressions passed; they are not physical acceptance. No AI-generated creative decisions were accepted into story records. No new global working selector or integrated pane was introduced. The shared projection supports future shell work while retaining independent authorities.
Legacy/reviewed schedule stores and completion semantics remain separate. Richer visual unification, milestones/exceptions, dynamic planning controls and a complete rebalance-review interface remain Phase6 work. Setup still validates project/book compatibility on the server rather than introducing a new selector API. Other missing-data and full-graph audit gaps remain recorded; this foundation release does not claim to complete all Writer2 or Writer3 features.
Specific manual acceptance
- On Windows, open an existing linked saved manuscript. Confirm ribbon book/chapter/scene and live standalone Context/Intent follow the accepted mapping; unsaved or mapping-pending states must not guess a scene.
- Open Context and Intent on separate monitors. Check Detect displays with allowed/denied permission, named-window reuse, focus, reconnect and changed monitor topology. Verify existing fallback and Windows-controlled Word placement.
- Keep a pinned reference on another scene; explore plot/metric/map references. The saved working objective and session target must remain unchanged. Only an explicit Word-navigation control should request a cursor move.
- Select a different Reader chapter while a session is active. Confirm Reader text changes independently and the active session remains associated with its original chapter. Check actual accepted-text refresh and Focus reading with the installed Windows PWA.
- Start Audio Review after compatible Companion/player registration. Check repeated Play/Pause/±15s, actual text-edit pause, cursor/scroll negative cases, source loss/recovery, explicit resume, End tracking versus external Pause, and Journey evidence with no duplicated duration.
- In the installed Windows PWA, open page Help through the contextual ribbon and inspect full article/drawer. Check plan returns with multiple books and All Books plans. Repeat inaccessible-book checks using a genuine collaborator account without owner evidence authority.
Next phase
Await explicit acceptance before Phase2. Recommended first batch:2A Home/destination route states and viewport/keyboard interaction sketches using the existing application shell, preserving all legacy routes and Utilities. Then implement the three Home choices and five destinations before the resizable main/companion composition. Do not remove standalone Context/Intent.