15 KiB
Raw Blame History

Replacement-package brief: PlotDirector Writing Problem Solver

Prepared 1 November 2026 against repository commit b01fdae. Do not publish this package. This document replaces the experimental tuning work following the owner's request for a revised source package.

What to retain

Keep the curated vocabulary, writer-led approach, stable IDs/slugs, substantive wording, 48 signals, 44 nodes, 52 solutions and 15 capabilities. There is no reason to discard the editorial work or invent extra nodes. The difficulty is the fit between the exported graph, the existing framework's stopping/ranking rules and the semantic expectations. Not every observed failure proves a piece of content is wrong.

The supplied original ZIP is untouched. Experimental corrections are not approved and are not loaded into the development database. The existing demo remains the published graph. No deployment, migration, publication or indexing was performed during this audit.

1. Export the actual repository schema

The real CLI initially rejects the JSON at nodes[0].routes[0].choiceId. Translate these fields throughout the replacement:

Supplied field Repository field Location
choiceId choice Routes: 66 occurrences
coefficients signals All 52 solutions
relatedQuestions questions All 52 solutions and 15 features
relatedSolutionIds related All 52 solutions
featureId feature Every solution/feature mapping
explanation reason Every solution/feature mapping
principle No such feature property All 15 features; its exact text already appears in their content, so omit the duplicate field without losing the text

principle is supported on solutions. Keep it there. Do not change IDs, slugs or scoring values merely to rename properties. Unknown properties are rejected; do not invent a top-level signal-vocabulary field or additional editorial properties in the import JSON. A vocabulary can remain in the master matrix or manifest.

The portable review bundle includes the actual SolverGraph.cs, WritingSolverEngine.cs, WritingSolverValidator.cs and demo.json from the repository. Use those rather than inferring an export schema from prose. A route and mapping look like:

{"target":"track-what","choice":"losing-track","priority":100,"allowCycle":false}
{"feature":"plot-lines","primary":true,"reason":"Explain why this view helps with this problem."}

Weights and coefficients are dictionaries of signed, nonzero integers between −100 and 100. IDs/slugs are lowercase letters/digits separated by hyphens. A primary feature is required. Nodes use area or question; solutions are separate records. Do not add new node types to model adoption concerns without an agreed framework change.

2. Define fallback outcomes explicitly

After schema translation, the real validator reports 25 missing fallback choices:

rescue-confidence, track-people, track-knowledge, track-time,
track-plots, track-places, track-objects, track-structure,
flow-thread, flow-character, flow-relationship, continuity-what,
continuity-time, continuity-object, change-what, change-order,
series-thread, cast-size, relationship-map, time-duration,
time-parallel, time-nonlinear, existing-stage, existing-barrier,
character-meeting

For each, specify what an author means by “none of these” and what should happen next. Do not simply attach every question to the same rescue node. That introduces repetitive journeys and many additional states. A broad, uncertain complaint may deserve another gentle question; a final specialist question may instead end with honest, neutral advice when there is insufficient evidence. Describe the intended neutral outcome in the handoff so it can be tested rather than counted as an unexplained dead end.

Fallback is exclusive in multi-select questions. Do not mark an ordinary combinable symptom as fallback. Clarify whether existing choices such as “Honestly, several of those” mean an exclusive umbrella answer or a selectable combination.

There is also an unpermitted structural cycle in the supplied routes: change-knowledge/dont-know → change-damage, then the knowledge-conditioned route back to change-knowledge. Either redesign that uncertainty rescue or explicitly describe why the cycle is intentional and how it exits. Runtime never asks a visited node again; a loop in the editorial diagram does not make revisiting possible in the UI.

3. Design for the actual stop rule

The framework does not always follow a matching next-node edge. After each submitted answer it:

  1. Adds selected signal weights.
  2. Scores every active solution by its signal/coefficient dot product.
  3. Ranks qualifying solutions by raw score, then solution order and ID; returns at most three.
  4. Stops once minAnswers is reached and any solution qualifies, even when a follow-up edge exists.
  5. Otherwise stops at maxAnswers, or when there is no eligible unvisited target.

The supplied minAnswers is 2 and maxAnswers is 6. Broad context must not cross an unrelated threshold before the question needed to distinguish the actual problem. Conversely, do not require an extra answer if a useful, specific result is already established.

Structural reachability alone found 44/44, but actual traversal after schema/fallback compatibility work found these follow-up nodes unreachable:

story-payoff, continuity-object, change-order, series-what,
series-thread, time-duration, time-nonlinear, existing-stage,
existing-barrier

D49 was also unreachable as a returned recommendation. This was an intermediate compatibility audit, not a claim that the untouched original passed validation; the original cannot get past the schema/fallback checks.

Two examples explain the issue: story-problem/no-payoff already gives D06 a qualifying score of 24, so story-payoff is never asked; track-time/elapsed already gives D28 28 points after a normal dates entry, so the time-duration follow-up is skipped. Decide which follow-ups add useful discrimination and preserve them by adjusting their preceding evidence, not by raising journey length globally.

4. Resolve the measured collisions

The supplied acceptance file has complaints and expected IDs, but no literal paths. The audit mapped complaints conservatively and checked every prefix through the real engine. Removing unnecessary trailing questions yielded 48/60 matching illustrative mappings. That is a reproducible diagnostic snapshot, not an authoritative 60-case verdict: some mappings need an editorial decision from the source designer.

The machine-readable observed-baseline.json records all 60 mappings, actual accepted prefixes, accumulated signals, all 52 solution scores, thresholds, returned results and failures. The following need explicit decisions:

Cases Observation before semantic tuning Required decision
9, 53, 56 D11 presence balance scores 49; expected D10 absence scores 46. D11's coefficients weakly dominate D10 for positive presence/distribution evidence. Distinguish absence from disproportionate presence without creating a false plot or character-arc problem.
12 The generic character-facts answer stops at D13=32; D29=23. The age question is never asked. Keep the birthday/date distinction reachable; ordinary character facts must still lead to D13.
13 “Whether they have met at all” ends without a qualifying result; D21=12 against threshold 24. Is this unknown meeting history, or evidence of premature knowledge? Clarify why D21 is required without pretending uncertainty proves a contradiction.
24 The closest existing secrets/revelations choice returns D24=28; intended D26 scores 9. Supply an honest reader-information choice distinct from what a character knows and from revision breaking reveal order.
30 General overload D52=34 beats the scene-navigation problem D33=30. Specific evidence about navigating 180 scenes should beat broad overload.
34, 46 An order change stops at scene placement D34=24 before experiment/comparison is asked. D37=11; D49=4. Distinguish locating a scene, trying a different arrangement and keeping alternative versions.
47, 48, 59 A general series entry stops at D50=32 before series-what. D51=18. Cases 47/59 may already have the right broad result, but the same stop prevents case 48 identifying a deliberate long-running thread. Preserve the cross-book facts versus long-range thread distinction. Add a truthful relationship-progression-across-books choice for case 59.

Do not tune solely to these exact paths. Add counterexamples: ordinary character facts, actual chronology conflicts, a minor character dominating, and a genuinely overloaded author without a more specific problem.

Case 55 exposes a technical-pass concern: intentional nonlinear order returns primary D30=36, but also returns chronology-conflict D27=24. The existing mustNot rule only prevents domination, so this passes despite presenting a possible false error. Decide which intentional-complexity cases forbid a diagnosis anywhere in the returned set. Similar care applies to deliberate character absence and slow relationships.

Some complaints have no precise literal choice. For example, case 57 asks whether a deliberately slow romance progresses; selecting “it stops” overstates the complaint. Case 58 asks who knows an object-related fact; it does not literally say the writer has forgotten who told someone. Provide paths that preserve those distinctions instead of forcing the tests through more convenient wording.

5. Keep adoption concerns separate from diagnoses

The supplied adoption nodes are structurally connected, but automatic stopping makes them unreachable under the real engine. Specify a voluntary, non-diagnostic path for:

  • Existing completed manuscripts and reluctance to enter hundreds of scenes manually.
  • Discovery writing.
  • Retaining creative control and avoiding software judgement.
  • Wanting just enough organisation to return to writing.

Give the exact reassurance and how the author returns to the problem conversation, if they choose to. These concerns should not add evidence that their novel has a fault. If the current schema cannot express the desired final reassurance, identify that limitation explicitly rather than disguising it as a writing diagnosis.

6. Supply executable acceptance paths and guardrails

Keep the original 60 case IDs and complaints. Add a separate acceptance-paths.json with, for each case:

  • Literal node IDs and selected choice IDs in order, including multi-select combinations.
  • Expected next question or completion after every prefix.
  • Expected primary result, or explicit continued broadening/neutral completion.
  • Supporting results required, acceptable or forbidden. Clarify that optional may results need not all appear.
  • For compound cases, which additional result must actually be returned.
  • A brief explanation where the complaint could honestly map to different choices.

Example shape for the test artifact, not for the import graph:

{
  "id": 50,
  "answers": [
    {"node":"entry","choices":["unsure"]},
    {"node":"rescue-happening","choices":["reread-cant-see"]}
  ],
  "expectedNext":"rescue-confidence",
  "expectedPrimary":null,
  "requiredSupporting":[],
  "forbiddenResults":[]
}

Test each prefix separately. Passing a complete history directly to Evaluate can replay answers that the actual UI would never have asked after an earlier stop. Primary-only tests are also insufficient to detect false error recommendations in supporting results.

Keep 2–4 answers normal, with 6 as an emergency ceiling. Include all-uncertain journeys, cross-entry convergence, multi-select overlaps, revision of earlier answers and a specific knowledge complaint that starts from overwhelm. Case 50 should not acquire a narrow diagnosis merely because the author remains uncertain.

7. Validate complexity after the paths are settled

The framework caps validation at 100,000 states and 12 substantive choices in a multi-select node. An experimental repair reached the ceiling even though its 60 selected cases passed. That is not proof the original export exceeds the ceiling: the repair added rescue routes and changed scoring, so it is a separate candidate.

Reduce redundant rescue alternatives and repeated uncertainty detours before simplifying substantive choices. Keep the full catalogue and meaningful alternative starting complaints. Do not flatten it into feature categories or claim a capped exploration proves all states safe. The validator's state-count diagnostics/deduplication also merit review separately from content; temporary experimental changes to that code have been removed from the repository.

8. Preserve content; flag the unfinished editorial parts

The 67 pages have stable routes and usable basic metadata. Do not rewrite the catalogue to repair routing. Address these specific issues:

  • All relatedQuestions arrays are empty; after renaming to questions, that discoverability field will still be unpopulated.
  • Solution content largely repeats recognition and principle, followed by a shared generic “What to look for” paragraph. It does not yet supply distinct, practical inspection advice for each problem.
  • The existing renderer already prints summary and principle before main content, so including them again in content creates repetition.
  • Mapping explanations mechanically use imperative feature titles as sentence subjects (“See the threads … is the clearest place…”). Correct that grammar without replacing the author's voice.
  • Keep nonlinear order, absence and slow development explicitly compatible with creative intention. Check supporting recommendations as well as the winning page.
  • Problem recognition must precede product capabilities. Features should explain the writing difficulty they help make visible. No claim that PlotDirector judges creative quality.

These are editorial review items, not permission to replace all text with generic marketing copy.

Replacement deliverables and approval boundary

Supply a ZIP containing:

  1. Schema-exact candidate JSON, retaining stable IDs/slugs and recording intentional changes.
  2. Updated master matrix and 48-signal vocabulary.
  3. Original 60 acceptance cases plus author-approved literal paths and prefix expectations.
  4. A change log explaining each scoring, routing, choice or content change.
  5. A local assembly report distinguishing schema checks, structural edge reachability, actual engine reachability and behavioural expectations. Do not label a structural pass as a repository validator pass.
  6. A handoff marked offline candidate — do not publish or index.

Codex should then run the actual repository validator, full reachable-state exploration and executable acceptance suite. Report failures and semantic concerns rather than tuning to green without a documented reason. Publication to Development remains a separate task requiring the owner's approval. Production is outside scope.