PlotDirector/Docs/Writer/Writer3/Phase3A-Execution.md

24 lines
3.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Phase3A execution and authoring contracts
Authorised3A only after Phase2 completion. Shared branch; unrelated investigation retained. No manuscript editor or3B native changes.
## Authoritative discovery
Chapter purpose is ChapterPurposeID lookup plus existing Summary; chapter intentions are the five ChapterGoals fields, not a new notebook. Scene intent/outcome are ScenePurposeNotes/SceneOutcomeNotes. SceneNotes retain type/pinned/resolved/order; SceneChecklistItems retain independent completion; SceneWorkflow retains separate priority/count/date/blocker/readiness and legacy draft fields. Canonical scene revision state remains Scenes.RevisionStatusID. Session notes, accepted manuscript evidence and story references remain separate systems.
Existing Scene_Get/SceneMetric_ListByScene seed metric defaults, so the new surface uses the pure chapter scene list and location read instead. Existing ChapterGoal_Get creates a row; SceneWorkflow_Get creates workflow and eight default checklist items; SceneService edit/writing loaders call those getters. New inspection therefore uses a bounded, authorised read procedure with no initialisation. Existing canonical goal/note/checklist/workflow saves are reused under a transaction. Chapter summary/purpose and scene intent/outcome use narrow updates to the existing columns rather than broad entity saves that may replace unrelated metadata.
Field-scoped fingerprints plus row/range locks protect stale updates and repeated creates. No new tables. Normal read fingerprints exclude unrelated parent/audit timestamps. Canonical nvarchar(max) text remains unrestricted beyond existing HTTP limits; note titles200 and checklist text300 retain canonical bounds. Optional integer/date controls remain NULL when blank.
## Batches
-3A.1: compact saved focus and existing unified Save/Record/Plan; chapter-only/scene-specific authoring, explicit scene-focus change, optional whole-book/no-focus state.
-3A.2: chapter purpose/summary/goals and scene purpose/outcome; independent editors, Save/Cancel, errors, stale409, retained dirty values and navigation guard.
-3A.3: scene notes/checklist/workflow, explicit creation only, progressive details; canonical revision/readiness preserved. Attachments, deletion and complex category/dependency edits remain labelled existing routes.
-3A.4: saved setting/appearances/threads/verified relationship events and chapter feeling intention; no inference, analysis or replacement standalone windows.
-3A.5: Markdown Help, schema/controller/browser/PWA and transactional SQL coverage, full harness, authenticated Development qualification, snapshots, cleanup and rollback release.
SQL265 introduces procedures;266–270 are forward-only corrections discovered through live-schema/transactional qualification (optional NULLs, long JSON conversion, field-level concurrency, empty collection tokens and canonical text lengths). Already-applied numbered scripts remain immutable. All are additive procedure changes, compatible with the Phase2 application. Verified Development backup precedes application/fixture writes. Final status and deferred editors are recorded in Phase3A-Report.md.
Completed: batches3A.1–3A.5 implemented, tested and deployed to Development; final release and evidence in [Phase3A-Report.md](Phase3A-Report.md). Phase3B remains unstarted.