5.1 KiB
Development review: Writing Problem Solver
Implemented 1 November 2026. Development only; no production database or host was changed.
Review routes
- https://dev.plotdirector.com/writing-problems
- https://dev.plotdirector.com/writing-problems/managing-interweaving-plot-lines
- https://dev.plotdirector.com/writing-problems/finding-a-clearer-view-of-your-novel
- https://dev.plotdirector.com/features/plot-lines
- https://dev.plotdirector.com/features/scenes
- https://dev.plotdirector.com/features/characters
- https://dev.plotdirector.com/admin/writing-solver (administrator required)
- https://dev.plotdirector.com/sitemap.xml
Try The story itself → several threads + characters move between them → seeing where each thread appears. Revise an answer using Back. Try People → None of these → not sure for the broader advice route. This is deliberately only a small demonstration, not the final question collection. Demo editorial pages are noindex; curated active/indexable pages enter the sitemap automatically.
Implementation inventory
PlotLine/Models/WritingSolver/SolverGraph.cs: typed graph, signal vectors, conditional routes, page/editorial metadata and many-to-many primary/supporting feature mappings.PlotLine/Services/WritingSolverEngine.cs: deterministic scoring, question selection and complete answer recalculation.PlotLine/Services/WritingSolverValidator.cs: structural checks and bounded exhaustive reachable-state validation.PlotLine/Data/WritingSolverRepository.cs: Dapper/stored-procedure access, strict JSON import and validated snapshot caching.PlotLine/Sql/206_WritingProblemSolver.sql: versioned graph table and atomic publication/read procedures. No existing migration changed.PlotLine/Content/WritingSolver/demo.json: four nodes, two demonstration diagnoses and three features; six entry areas with a clearly explained demo fallback.PlotLine/Controllers/WritingProblemsController.cs: anonymous, expiring signed history; server-rendered journey, solution and feature routes.PlotLine/Controllers/WritingSolverAdminController.csandViews/WritingProblems/Admin.cshtml: authorised inspection tables, full JSON, validation reports and version publication.PlotLine/Views/WritingProblems/{Index,Page,Solution,Icon}.cshtml: accessible, responsive public presentation and practical advice before product capabilities.PlotLine/wwwroot/css/writing-solver.css: public-only palette refinement, responsive layouts and decorative edge-image fade. Existing public home/tour content and application themes retained.PlotLine/wwwroot/js/writing-solver.js: small progressive enhancement for fallback exclusivity and empty selections. The journey remains functional without JavaScript.PlotLine/wwwroot/images/public/writing-solver-desk.png: generated decorative imagery; prompt and provenance in Framework.md.PlotLine/Controllers/SitemapController.cs,Views/Shared/_PublicLayout.cshtml,Program.cs: existing SEO/navigation/layout/DI integration.Tools/WritingSolver/{Program.cs,WritingSolver.csproj}andPlotLine.slnx: developer validation/import, development database guards and migration helper.PlotLine.Tests/WritingSolverTests.cs,Program.cs,ToolbarBrowserHost.cs,Browser/writing-solver.cjs,Browser/public-site.cjs: engine/import/state/browser regressions and updated shared public palette expectations.
Verification
dotnet build PlotLine.slnx: passed; two existing nullable warnings in the regression harness.dotnet run --project PlotLine.Tests/PlotLine.Tests.csproj --no-build: 378 PASS results, no failures.node PlotLine.Tests/Browser/writing-solver.cjs: passed real MVC/Razor journeys at 390px and 1440px, browser Back/revision, multi-select/fallback, three-feature results, no-JS forms/direct pages, canonical/social/JSON-LD, indexable sitemap inclusion and noindex exclusion, invalid state, overflow and layout-shift checks.node PlotLine.Tests/Browser/public-site.cjs: passed all six application themes, browser/PWA contexts, signed-in/out, authentication palette/form validation, responsive layouts, assets/navigation/SEO.- Strict import validation and development database verification passed. Schema table and both procedures confirmed; demo-1 published atomically.
- Development backup before successful migration:
/var/opt/mssql/backup/PlotDirector_Development_solver_20261101_143004.bak(225,603,584 bytes). BACKUP WITH COPY_ONLY/CHECKSUM completed and mapped file existence/size verified. This is not a restore test.
Import contract and limits
See Framework.md for the structured JSON contract, CLI commands, administration, scoring/tie-break rules, publication/rollback process and asset prompt. Versioned document storage publishes the graph atomically. The public journey visits a node once and is capped at six answers. Import validation rejects graphs exceeding 100,000 queued/visited scoring states or multi-select questions with more than 12 substantive choices; it never silently skips unvalidated routes. These are explicit complexity safeguards. Review editorial quality and representative journeys when the curated collection arrives.