67 lines
8.6 KiB
Markdown
67 lines
8.6 KiB
Markdown
# Ready-to-paste Windows Codex implementation prompt
|
|
|
|
Continue the existing PlotDirector Companion on branch **`codex/word-companion-native-phase1-20261104`**. Expected Atlas application handover commit: **`be88c1d068a4c384c5db348238ac78704b6f73e9`**. Native application version: **1.0.0.12**. Documentation-only descendants may follow that application commit; verify ancestry and inspect subsequent source changes before proceeding. Record the exact fetched HEAD and build that clean revision. Confirm `git diff <expected-application-SHA> HEAD -- PlotDirector.NativeCompanion PlotLine PlotLine.Tests` is empty for documentation-only descendants; inspect any nonempty source difference explicitly.
|
|
|
|
## Boundaries
|
|
|
|
Atlas has implemented the Windows Forms control-centre redesign, Windows light/dark presentation policy, chapter activity labels, Context previews and persisted Intent evidence. Do not redesign that UI, replace WinForms, create another tray process/web server/auth mechanism, or duplicate Atlas application logic. Correct only proven Windows-specific defects. Preserve the minimal VSTO adapter, authenticated/versioned IPC, per-document identities, canonical import pipeline and author data.
|
|
|
|
Do not use Computer Use, mouse automation, desktop control or UI-driving tools. Do not launch Word, Visual Studio, installers or approval dialogs during unattended implementation. Do not terminate Word/Visual Studio or alter workloads, extensions, PATH, certificates/trust stores or machine settings. Native visual acceptance belongs to a separately scheduled human session.
|
|
|
|
## 1. Synchronise safely
|
|
|
|
1. Locate the existing Windows PlotDirector checkout; inspect `git status --short --branch`, `git remote -v`, and `git log -5 --oneline` before edits. Preserve local work. Stop branch integration if histories diverge; never reset, rebase, force-push, auto-stash or create another branch.
|
|
2. Require the shared branch above. Determine its configured tracking remote with `git config --get branch.codex/word-companion-native-phase1-20261104.remote`. Fetch that remote, inspect ahead/behind counts and fast-forward only.
|
|
3. Require `git merge-base --is-ancestor be88c1d068a4c384c5db348238ac78704b6f73e9 HEAD` success. Read `Docs/WordCompanion/WindowsHandover/README.md`, the daytime report, and the overnight investigation/verification notes. Inspect source changes since the last qualified Windows installation.
|
|
4. Preserve the known-good installer and qualification report under `PlotDirector.NativeCompanion/WindowsValidation/Setup/`. The known-good installed baseline is **1.0.0.10**, payload source `6cdb49c08a74852d5089be8a40c07309543954d1`, MSI ProductVersion **1.0.10**, qualified Windows handover `97f5d99`. Its recorded EXE SHA256 is `9526E3781EB2EF9936132786E1E2242633349933A553E93E7A7D0B038160A7FF`. Verify the actual laptop state; do not assume it still matches.
|
|
|
|
## 2. Build managed and VSTO components without installing
|
|
|
|
Prerequisites: existing .NET 10 SDK and x64 Windows Desktop runtime, .NET Framework4.8/VSTO runtime, Office-equipped MSBuild discovered by vswhere, SDK mage, and the existing valid CurrentUser code-signing certificate/private key. Missing prerequisites are blockers for that phase, not permission to launch installers or repairs.
|
|
|
|
From the checkout root, use the existing entry point:
|
|
|
|
```powershell
|
|
.\PlotDirector.NativeCompanion\WindowsValidation\Update-WordCompanion.ps1 -CertificateThumbprint '<existing developer certificate thumbprint>'
|
|
```
|
|
|
|
The script fetches/fast-forwards, builds `PlotLine.slnx`, runs the established native regressions, builds `Vsto/PlotDirector.WordAddIn.csproj` with signed manifests, publishes `Agent/PlotDirector.Companion.Agent.csproj` for **net10.0-windows / win-x64**, and verifies a complete developer package. It must not install anything. It deliberately avoids Office Clean/F5 registration (`PrepareForRunDependsOn=CopyFilesToOutputDirectory`); preserve this. If signing would trigger an interactive private-key approval, stop before that phase and report the requirement.
|
|
|
|
Expected developer output: the Windows Downloads known folder, `PlotDirectorWordCompanion\1.0.0.12-<first8-build-SHA>`, containing signed `PlotDirector.WordAddIn.vsto`, `PlotDirector.WordAddIn.dll.manifest`, VSTO runtime files, `Agent\PlotDirector.Companion.Agent.exe` and its managed dependencies, plus hash inventory `package.json`. Use the actual output printed by the script; Downloads may be redirected. Do not present `.vsto` as the complete installer.
|
|
|
|
Review the printed legacy `Install-WordCompanion.ps1` suggestion but **do not execute it for this assignment**. The deliverable remains the unified EXE/MSI for both components.
|
|
|
|
## 3. Focused Windows compatibility work
|
|
|
|
- Managed UI: `Agent/TrayApplication.cs`, `Agent/CompanionPresentation.cs`. Check compilation, Windows theme registry/event handling, accessibility, DPI/resizing and owner-drawn chapter rows. Change Atlas UI only for a reproduced native defect, with regression evidence.
|
|
- VSTO: `Vsto/WordAdapter.cs` is functionally unchanged from Windows baseline; only assembly version metadata advances. Do not add HTTP, AI, background COM or expensive document reads. No VSTO redesign is expected.
|
|
- Tray/IPC: existing current-user pipes, singleton activation, grant lifecycle, book metadata and chapter batching remain the architecture. No new IPC contracts were introduced in this daytime UI sprint.
|
|
- Web/server already deployed to Development: Context reference previews and Intent evidence, including SQL235. Do not apply SQL or deploy server code from Windows. Intent compares saved `SceneManuscriptSources`, not current unsaved Word prose. It does not automatically complete objectives.
|
|
|
|
## 4. Prepare the existing unified installer — Windows-owned work
|
|
|
|
Atlas intentionally did not change `WindowsValidation/Setup` from `97f5d99`. **`Setup/Build-Setup.ps1` currently refuses any payload other than exact version10/source6cdb49c.** That is an intentional qualification guard, not a build error to bypass casually. Native version12 is not yet packaged or installed.
|
|
|
|
After managed/package checks, update the existing builder and `Setup/Setup.cs` coherently for the qualified version12 payload. Preserve the baseline artifact separately. Review all hard-coded application/file/bootstrapper versions, package-source pin, MSI three-part ProductVersion (version12 relationship is `1.0.12`), ProductCode/upgrade rules, component identity, manifest paths/signatures, uninstall metadata and output defaults. Preserve UpgradeCode and safe per-user behaviour; choose and test the correct ProductCode strategy rather than guessing. Never relabel old bytes as version12 or reuse the old payload pin.
|
|
|
|
Use the existing command shape, after the builder has been deliberately updated and reviewed:
|
|
|
|
```powershell
|
|
.\PlotDirector.NativeCompanion\WindowsValidation\Setup\Build-Setup.ps1 `
|
|
-PackagePath '<verified version12 complete developer package>' `
|
|
-OutputDirectory '<new empty output directory>' `
|
|
-CertificateThumbprint '<existing developer certificate thumbprint>'
|
|
```
|
|
|
|
Expected output: **PlotDirectorCompanionSetup.exe** with embedded signed **PlotDirectorCompanion.msi/CAB**, covering VSTO and tray. Preserve the same-user normal-Windows bootstrapper escape from packaged environments, native Windows Installer context verification, exact-product VSTA backup/uninstall handling, limited-privilege MSI summary, shortcuts and user-state exclusions. Do not introduce a new installer mechanism.
|
|
|
|
`Setup.exe --install` is **not unattended**: current source still has completion/error/trust UI. Do not run it during unattended work. Do not bypass trust/UAC. Installation/upgrade testing needs the controlled procedure in prompt02 and a scheduled approval window.
|
|
|
|
Preserve `%LOCALAPPDATA%\PlotDirector\Companion` state, existing document book associations and application data. Tokens are memory-only: browser sign-in again after tray restart is expected, not an upgrade regression. Never open/save user documents to test packaging.
|
|
|
|
## 5. Deliver and stop before interactive acceptance
|
|
|
|
Run prompt02's feasible automated checks. Commit only validated Windows-specific corrections and packaging work to the same branch. Fetch before pushing; reconcile concurrent updates without history rewriting or discarding work. Leave the checkout clean. Report exact commit, app/MSI versions, package locations/hashes, signatures, prerequisites, identity/context, automated results, and which install/Word/visual checks remain unproved.
|
|
|
|
If the real user environment is inaccessible, continue builds/package validation; defer installation alone. Do not claim Word load, visual polish or upgrade success from registration, compilation or a private sandbox.
|