13 KiB
Intelligent Writer workspace — Development sprint
Code: 412a870aa6547bffa1fae2c4319022169dba10be. Shared branch: codex/word-companion-native-phase1-20261104. Development release: 412a870-20261115T172113Z. Production, Test and Master were not changed.
Delivered
- Prominent red Help Me: a replaceable deterministic recommendation provider selects up to four distinct destinations from actual saved focus, reviewed/legacy plans, missing chapter Intent, scene workflow labels, captured notes, accepted gross changes and available chapters. Observation, possible interpretation and suggested action are separate. No external AI call or invented manuscript defect. Dismissal and Return to Writing preserve the saved book/chapter/scene objective; no Word navigation/mutation is triggered by opening suggestions.
- Writing Rhythm: explicit Writing, Editing, Planning, Reading and Audio Review sessions with resumable current state and optional return/review notes. Visible, focused, recently interacted browser engagement is measured separately from elapsed time using server-bounded monotonic heartbeats. Idle/network gaps and retries do not manufacture time. Sessions expire after twelve hours. Start/end checkpoints reference the accepted revision and paragraph count without copying prose. Existing accepted-change capture remains the sole source of gross additions/deletions/net changes.
- Writing Journey: real month view, graduated green intensity, year overview, selected-book/project context, date navigation and daily drill-down. Calendar includes accepted changes, declared work/review sessions and observed playback; zero net growth remains activity. Neutral days are not failures. The Overview's compact strip also includes planning/review evidence without needing a manuscript baseline. Dates use UTC receipt days; time crossing midnight is attributed to the receiving day. Green buckets are a relative visual summary of recorded counts and bounded time bands, not a scientific productivity score.
- Scheduling correction: the old engine only admitted Outlined, Needs Work and Revised scenes, so imported/other-status chapters could yield zero tasks despite substantial availability. New plan setup saves availability, then requires review of actual chapter/scene candidates, activity choices and adjustable budgets before allocation. Chapters without scenes are supported. Known estimated scene length can seed a budget; unknown work uses an explicitly labelled starting allocation, never an assertion of equal effort or completion time. Allocation shares daily capacity, splits longer activities and explains insufficient capacity before changing a schedule. Empty previews report actual missing chapters, blocked scenes or existing manual-task counts, with direct correction routes.
- Existing plan records, All Books scope, manual scene tasks, editing, activation and deletion remain. Reviewed allocations appear in plan totals, schedule preview, upcoming Writer work and Journey; they can be marked complete. Reallocation cannot discard completed reviewed work. Empty legacy regeneration now preserves existing tasks instead of replacing them with an empty list.
- Audio Review server/UI foundation in Writer and the read-only Reader: chapter association, explicit start/end, preference, position/duration/state, elapsed/browser/observed/unique measures, notes, bounded commands and clear unavailable state. End stops tracking; Pause is a separate explicit player action. Older agents keep working and controls remain disabled without fresh supported media telemetry.
Audio accounting and secure handoff
The shared optional v1 DTO and HTTPS route reuse DesktopPairing authentication, current instance/session/grant leases and book ownership. There is no new pairing channel, public local server or unrestricted OS endpoint. The only commands are Play, Pause and relative ±15-second seek, with UUID acknowledgement/deduplication, media-key checking and ten-second expiry. A review binds an unambiguous native book session; Word or explicitly registered media-only contexts can be used. No silent retargeting is permitted.
Consecutive same-key/same-rate playing samples establish bounded intervals. Gaps, seeks, pauses and changed sources do not create inferred listening. Unique coverage is an interval union; replay adds observed playback without duplicating unique coverage. Seek counts require an explicit seek event or acknowledged seek command, not a discontinuity guessed from network gaps. A 4,096-range bound produces an explicitly partial lower bound. Playback does not prove attention or text alignment. Browser and audio durations may overlap and are never added into a fabricated total active time.
Journey can associate actual accepted changes and changed paragraph identities with a review interval. Book-wide gross counts remain labelled book-wide; paragraph associations use the selected chapter. This establishes temporal overlap, not causation. Pause on Edit is exposed and versioned: actual text mutation requests Pause when supported, cursor/scrolling does not, and resume is always explicit.
Windows work is deliberately not implemented. Read the exact Audio Review contract and Windows acceptance steps. The deferred audiobook-production architecture specifies the requested 100,000-credit reserve, stable paragraph/text/voice/settings cache key, resumable charge reconciliation, separate Generated/Approved states and explicit capped overage approval. It adds no audiobook schema, API calls, credentials or workers.
Database and privacy
- Migration 262: compact owner-private work/review sessions, daily measurements, authorised operations, bounded calendar/evidence reads and retention pruning.
- Migration 263: reviewed chapter/scene allocations under existing WritingPlans, scope-validating persistence, completion, upcoming reads and compatible management totals. Cascades follow plan/book/chapter/scene deletion.
- No prior numbered migration was changed. Canonical manuscript tables/procedures, paragraph GUIDs, accepted revision/hash handling and native offline queue formats are unchanged.
- Recording pause and configured retention from existing Reports also govern new session observations. Confirmed history erasure removes the owner's sessions/notes; book/account deletion cleans them up. Recent session evidence can be exported, including a selected-day scope. Exports/database backups remain separate copies. Work sessions and reviewed allocations are not added to the current portable manuscript backup format.
Qualification used a disposable database restored to separate files from a verified copy-only Development backup. The new procedures were tested against owned synthetic fixtures, never real projects. Before live migration the effective database was verified as PlotDirector_Development, protected import/analysis guards passed and this fresh copy-only/checksum backup was verified:
/var/opt/mssql/backup/writer-intelligent-qualified-20261115T170926Z-a2be99dc.bak
Application-principal execute permissions were verified. The 14 pre-existing accepted manuscript revisions and hashes matched immediately before/after migration. Final comparisons after live fixture cleanup are recorded with the deployment verification below.
Verification
| Gate | Result |
|---|---|
| Solution build / Release publish | Passed, zero warnings/errors; isolated build servers used after one CLR runtime failure |
| Normal executable regression harness | 527 PASS lines, no failures |
| Portable Companion suite | 279 checks; Linux only, no physical Word/COM/Windows ACL claim |
| Focused database suite | 27 passed: identity/retry, ownership, chapter scope, bounded idle/engaged time, concurrent ordering, preferences, audio replay/coverage, Pause on Edit, no auto-resume, notes, calendar, chapter-only planning, completion preservation, accepted checkpoint/zero-net edit association, recording pause and erase |
| Native HTTP | Passed existing auth/subscription/antiforgery/mapping tests plus audio anonymous 401, missing exact lease 403 and unsupported version 400 before DB access; synthetic provider, no paid AI |
| New browser UI | Four themes × two widths × browser/simulated PWA: grounded Help, explicit sessions, notes, disabled unsupported commands, month/year calendar, zero-net revision and planning without accepted history |
| Existing browser regressions | 48 dashboard combinations; navigation/Context/Intent themes, reference-window identity/retry/pinned scope/display permissions, chapter-goal saves/unsaved guard and standard ribbon states all passed |
A 250,000-word / 250-paragraph fixture exercised explicit checkpoint creation/end and calendar queries. The measured run took 30 ms on this warmed disposable environment; this is not a general latency guarantee. A real accepted edit during the review produced one addition, one removal and one changed paragraph identity with ten unique observed audio seconds. Snapshot revision/hash stayed intact across the activity-only operations. Dashboard/state requests do not tokenize the manuscript; current-state polling reads one active session and an indexed preference, not full history.
Live authenticated Development acceptance passed in browser and simulated PWA using normal login/antiforgery and a dedicated author. Help opened the correct accepted Reader chapter; saved focus and private sessions/notes persisted; unsupported audio controls stayed disabled with zero playback; seventeen-hour weekly revision availability led to two reviewed allocations totalling 135 explicitly chosen minutes, not an unexplained empty preview. Completion updated Write Next, All Books plans retained scope, month/day drill-down showed sessions, and planning-only activity worked without any manuscript baseline. The remaining empty legacy table was removed after screenshot inspection and this was verified again in the final release.
The disposable author, owned projects/books/plans/sessions and private credential file were removed through normal account deletion. The disposable qualification database was removed with an exact name/physical-file guard. All 14 original canonical manuscript revisions and hashes matched again after final live cleanup.
Real authenticated Development screenshots (synthetic author data only):
- Writer Overview / Help Me
- Writing Journey
- Audio Review unavailable state
- Reviewed non-empty schedule
Commits: 6bc4203 delivers the foundation, UI, scheduling and Windows contract/design; 412a870 removes the final empty legacy panel and hardens live confirmation checks. Documentation/screenshots follow separately.
Deployment and rollback
Service plotdirector-dev is active; public HTTPS GET returns 200 with normal TLS. Published/deployed DLL SHA-256 matches:
668ae7ae9dbd1857cb7e1d3f4e937406640108b0b3a1984ec2d88ebb2c8ca4ce
Assembly informational version: 1.0.0+412a870aa6547bffa1fae2c4319022169dba10be.
Archive: /srv/apps/plotdirector-dev/releases/412a870-20261115T172113Z.
Previous physical application: /srv/apps/plotdirector-dev/current-before-412a870-20261115T172113Z.
Protected-work guards passed immediately before replacement. Existing appsettings/environment, data-protection state, uploads and logs were preserved. Follow Docs/Codex/Deployment.md to roll back the application using the retained directory, leaving the additive schema in place. The older UI will not display new session/derived-activity features; preserve their data. If an older application runs for an extended rollback, schedule dbo.WriterWork_Prune operationally so its new session retention continues. For a full pre-sprint application rollback, the earlier retained directory is /srv/apps/plotdirector-dev/current-before-6bc4203-20261115T171221Z. Do not restore/reset the Development database as a routine application rollback.
Limits and next steps
Physical Windows Word, GSMTC/Chrome, an installed Windows PWA and real monitors remain unverified. Windows Codex should fetch this branch, implement the optional authenticated contract, explicit media selection, bounded idempotent commands, actual text-change Pause on Edit and local nonblocking control, then qualify/package the Windows agent. Chrome's most recently active media-source limitation remains explicit.
Browser engagement is not measured Word active time. No writing-block/personality diagnosis, scientific productivity claim, every-keystroke capture or historical reconstruction is implemented. Precise scene revisit analytics and dialogue/narrative composition inference remain outside this sprint; existing accepted paragraph/scene associations are preserved. Work-session telemetry is live/bounded, not a new offline prose queue. Pending command slots coalesce superseded intent; native UUID deduplication/expiry handling is mandatory before rollout.
Scheduling uses each plan's saved availability; independent plans can overlap. Review is bounded to 1,000 candidates and 20,000 resulting allocations, with explicit UI/error limits. Flexible availability exceptions and the later full pass/dependency timeline remain future work. New operational data is not silently claimed to be portable backup content.
The existing untracked Docs/Investigations/CanonicalManuscriptArchitectureAssessment.md was preserved and excluded from commits.