Introduce verbatim editorial Guided Investigation catalogue v0.1 with qualified writing guidance
This commit is contained in:
parent
e56e3005aa
commit
a988982df3
469
Docs/Writer/Investigations/Production-Editorial-Source-v0.1.json
Normal file
469
Docs/Writer/Investigations/Production-Editorial-Source-v0.1.json
Normal file
@ -0,0 +1,469 @@
|
||||
[
|
||||
{
|
||||
"Id": "Q01",
|
||||
"Text": "What concerns you most about your story at the moment?",
|
||||
"Options": [
|
||||
{
|
||||
"Id": "A",
|
||||
"Text": "The plot doesn't seem to fit together or move forward."
|
||||
},
|
||||
{
|
||||
"Id": "B",
|
||||
"Text": "My characters or their decisions don't feel convincing."
|
||||
},
|
||||
{
|
||||
"Id": "C",
|
||||
"Text": "Some parts feel too slow, too rushed or uneven."
|
||||
},
|
||||
{
|
||||
"Id": "D",
|
||||
"Text": "The story doesn't have enough tension or emotional impact."
|
||||
},
|
||||
{
|
||||
"Id": "E",
|
||||
"Text": "I'm struggling to keep events, people or details consistent."
|
||||
},
|
||||
{
|
||||
"Id": "F",
|
||||
"Text": "Something feels wrong, but I can't identify what."
|
||||
}
|
||||
],
|
||||
"Help": "Choose whatever comes closest. We can explore the details together."
|
||||
},
|
||||
{
|
||||
"Id": "Q02",
|
||||
"Text": "When you look at the main events in your story, how well do they connect?",
|
||||
"Options": [
|
||||
{
|
||||
"Id": "A",
|
||||
"Text": "Each important event leads naturally to another."
|
||||
},
|
||||
{
|
||||
"Id": "B",
|
||||
"Text": "Some events feel disconnected from the rest."
|
||||
},
|
||||
{
|
||||
"Id": "C",
|
||||
"Text": "I have plenty of events, but I'm not sure how they fit together."
|
||||
},
|
||||
{
|
||||
"Id": "D",
|
||||
"Text": "I haven't worked out the main sequence of events yet."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Id": "Q03",
|
||||
"Text": "What usually drives your story forward?",
|
||||
"Options": [
|
||||
{
|
||||
"Id": "A",
|
||||
"Text": "My characters make decisions that change what happens next."
|
||||
},
|
||||
{
|
||||
"Id": "B",
|
||||
"Text": "Things happen to my characters, and they mostly react."
|
||||
},
|
||||
{
|
||||
"Id": "C",
|
||||
"Text": "New events keep appearing, but they don't always affect what came before."
|
||||
},
|
||||
{
|
||||
"Id": "D",
|
||||
"Text": "I'm not sure what drives the story forward."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Id": "Q04",
|
||||
"Text": "How clear is the direction of your story?",
|
||||
"Options": [
|
||||
{
|
||||
"Id": "A",
|
||||
"Text": "I know what the main characters are working towards."
|
||||
},
|
||||
{
|
||||
"Id": "B",
|
||||
"Text": "I know the ending, but I'm struggling with the journey."
|
||||
},
|
||||
{
|
||||
"Id": "C",
|
||||
"Text": "I know the beginning, but not where the story is going."
|
||||
},
|
||||
{
|
||||
"Id": "D",
|
||||
"Text": "I have several possible directions and can't decide between them."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Id": "Q05",
|
||||
"Text": "Do you understand why your main characters make their important decisions?",
|
||||
"Options": [
|
||||
{
|
||||
"Id": "A",
|
||||
"Text": "Yes, their reasons are clear."
|
||||
},
|
||||
{
|
||||
"Id": "B",
|
||||
"Text": "Usually, but some decisions feel difficult to justify."
|
||||
},
|
||||
{
|
||||
"Id": "C",
|
||||
"Text": "I know what they do, but not always why."
|
||||
},
|
||||
{
|
||||
"Id": "D",
|
||||
"Text": "I'm still discovering who these characters are."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Id": "Q06",
|
||||
"Text": "How do your main characters change as the story progresses?",
|
||||
"Options": [
|
||||
{
|
||||
"Id": "A",
|
||||
"Text": "Their experiences affect their attitudes, relationships or behaviour."
|
||||
},
|
||||
{
|
||||
"Id": "B",
|
||||
"Text": "Some characters develop, but others remain much the same."
|
||||
},
|
||||
{
|
||||
"Id": "C",
|
||||
"Text": "They experience events, but don't seem changed by them."
|
||||
},
|
||||
{
|
||||
"Id": "D",
|
||||
"Text": "I haven't considered how they might change."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Id": "Q07",
|
||||
"Text": "How well do your characters' relationships influence the story?",
|
||||
"Options": [
|
||||
{
|
||||
"Id": "A",
|
||||
"Text": "Their relationships affect their choices and actions."
|
||||
},
|
||||
{
|
||||
"Id": "B",
|
||||
"Text": "The relationships matter emotionally but rarely affect events."
|
||||
},
|
||||
{
|
||||
"Id": "C",
|
||||
"Text": "The characters interact, but their relationships feel underdeveloped."
|
||||
},
|
||||
{
|
||||
"Id": "D",
|
||||
"Text": "I'm having trouble keeping track of how everyone relates."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Id": "Q08",
|
||||
"Text": "Where does the pacing trouble you most?",
|
||||
"Options": [
|
||||
{
|
||||
"Id": "A",
|
||||
"Text": "The beginning takes too long to get going."
|
||||
},
|
||||
{
|
||||
"Id": "B",
|
||||
"Text": "The middle seems to lose momentum."
|
||||
},
|
||||
{
|
||||
"Id": "C",
|
||||
"Text": "Important events happen too quickly."
|
||||
},
|
||||
{
|
||||
"Id": "D",
|
||||
"Text": "The pace varies unpredictably throughout the story."
|
||||
},
|
||||
{
|
||||
"Id": "E",
|
||||
"Text": "I can't identify a particular section."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Id": "Q09",
|
||||
"Text": "What happens in the scenes that feel slow?",
|
||||
"Options": [
|
||||
{
|
||||
"Id": "A",
|
||||
"Text": "There's a lot of description or explanation."
|
||||
},
|
||||
{
|
||||
"Id": "B",
|
||||
"Text": "Characters talk without much changing."
|
||||
},
|
||||
{
|
||||
"Id": "C",
|
||||
"Text": "Events happen, but they don't seem important."
|
||||
},
|
||||
{
|
||||
"Id": "D",
|
||||
"Text": "I don't know which scenes are causing the problem."
|
||||
},
|
||||
{
|
||||
"Id": "E",
|
||||
"Text": "My concern is rushing, rather than slowness."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Id": "Q10",
|
||||
"Text": "When an important event occurs, how much room do you give its consequences?",
|
||||
"Options": [
|
||||
{
|
||||
"Id": "A",
|
||||
"Text": "Characters have time to react and events have lasting effects."
|
||||
},
|
||||
{
|
||||
"Id": "B",
|
||||
"Text": "Sometimes I move to the next event too quickly."
|
||||
},
|
||||
{
|
||||
"Id": "C",
|
||||
"Text": "I often skip reactions or consequences to keep the story moving."
|
||||
},
|
||||
{
|
||||
"Id": "D",
|
||||
"Text": "I'm not sure how much space these moments need."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Id": "Q11",
|
||||
"Text": "What stands in the way of your main character achieving what they want?",
|
||||
"Options": [
|
||||
{
|
||||
"Id": "A",
|
||||
"Text": "There are clear obstacles that become more difficult."
|
||||
},
|
||||
{
|
||||
"Id": "B",
|
||||
"Text": "There are obstacles, but they don't create much pressure."
|
||||
},
|
||||
{
|
||||
"Id": "C",
|
||||
"Text": "Problems arise, but they're usually resolved quite easily."
|
||||
},
|
||||
{
|
||||
"Id": "D",
|
||||
"Text": "I'm not sure what the main obstacles are."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Id": "Q12",
|
||||
"Text": "What happens if your main character fails?",
|
||||
"Options": [
|
||||
{
|
||||
"Id": "A",
|
||||
"Text": "There are clear and significant consequences."
|
||||
},
|
||||
{
|
||||
"Id": "B",
|
||||
"Text": "Something is at risk, but it doesn't feel especially important."
|
||||
},
|
||||
{
|
||||
"Id": "C",
|
||||
"Text": "I'm not sure what they stand to lose."
|
||||
},
|
||||
{
|
||||
"Id": "D",
|
||||
"Text": "Failure doesn't currently have much consequence."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Id": "Q13",
|
||||
"Text": "How do you feel about the emotional moments in your story?",
|
||||
"Options": [
|
||||
{
|
||||
"Id": "A",
|
||||
"Text": "They feel convincing and have an impact."
|
||||
},
|
||||
{
|
||||
"Id": "B",
|
||||
"Text": "I know what the characters feel, but it doesn't always come across."
|
||||
},
|
||||
{
|
||||
"Id": "C",
|
||||
"Text": "Emotional moments happen, but feel rushed or understated."
|
||||
},
|
||||
{
|
||||
"Id": "D",
|
||||
"Text": "I'm struggling to understand what the characters should feel."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Id": "Q14",
|
||||
"Text": "What are you finding hardest to keep consistent?",
|
||||
"Options": [
|
||||
{
|
||||
"Id": "A",
|
||||
"Text": "The order and timing of events."
|
||||
},
|
||||
{
|
||||
"Id": "B",
|
||||
"Text": "Where characters are and what they're doing."
|
||||
},
|
||||
{
|
||||
"Id": "C",
|
||||
"Text": "What different characters know at particular moments."
|
||||
},
|
||||
{
|
||||
"Id": "D",
|
||||
"Text": "Personal details, relationships or previous events."
|
||||
},
|
||||
{
|
||||
"Id": "E",
|
||||
"Text": "Several of these at once."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Id": "Q15",
|
||||
"Text": "How do you currently keep track of story details?",
|
||||
"Options": [
|
||||
{
|
||||
"Id": "A",
|
||||
"Text": "I have organised notes or records that I maintain."
|
||||
},
|
||||
{
|
||||
"Id": "B",
|
||||
"Text": "I have notes, but they're scattered or incomplete."
|
||||
},
|
||||
{
|
||||
"Id": "C",
|
||||
"Text": "I mostly rely on remembering what I've written."
|
||||
},
|
||||
{
|
||||
"Id": "D",
|
||||
"Text": "I keep rereading earlier chapters to check details."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Id": "Q16",
|
||||
"Text": "When you discover a contradiction, what usually caused it?",
|
||||
"Options": [
|
||||
{
|
||||
"Id": "A",
|
||||
"Text": "I changed something earlier without updating later events."
|
||||
},
|
||||
{
|
||||
"Id": "B",
|
||||
"Text": "I forgot a detail established previously."
|
||||
},
|
||||
{
|
||||
"Id": "C",
|
||||
"Text": "The timing or location of events doesn't work."
|
||||
},
|
||||
{
|
||||
"Id": "D",
|
||||
"Text": "Different characters appear to know things they shouldn't."
|
||||
},
|
||||
{
|
||||
"Id": "E",
|
||||
"Text": "I haven't noticed a particular pattern."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Id": "Q17",
|
||||
"Text": "When you reread your story, what bothers you most?",
|
||||
"Options": [
|
||||
{
|
||||
"Id": "A",
|
||||
"Text": "I lose interest in what happens next."
|
||||
},
|
||||
{
|
||||
"Id": "B",
|
||||
"Text": "I don't feel connected to the characters."
|
||||
},
|
||||
{
|
||||
"Id": "C",
|
||||
"Text": "Some parts drag while others seem rushed."
|
||||
},
|
||||
{
|
||||
"Id": "D",
|
||||
"Text": "Things happen that don't seem believable or logical."
|
||||
},
|
||||
{
|
||||
"Id": "E",
|
||||
"Text": "I notice inconsistencies and forgotten details."
|
||||
},
|
||||
{
|
||||
"Id": "F",
|
||||
"Text": "I can't identify anything specific."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Id": "Q18",
|
||||
"Text": "Which part of writing the story feels most difficult right now?",
|
||||
"Options": [
|
||||
{
|
||||
"Id": "A",
|
||||
"Text": "Deciding what should happen next."
|
||||
},
|
||||
{
|
||||
"Id": "B",
|
||||
"Text": "Understanding what my characters would do."
|
||||
},
|
||||
{
|
||||
"Id": "C",
|
||||
"Text": "Turning ideas into effective scenes."
|
||||
},
|
||||
{
|
||||
"Id": "D",
|
||||
"Text": "Making the story engaging or emotionally convincing."
|
||||
},
|
||||
{
|
||||
"Id": "E",
|
||||
"Text": "Keeping track of everything I've already established."
|
||||
},
|
||||
{
|
||||
"Id": "F",
|
||||
"Text": "None of these describes my difficulty."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Id": "Q19",
|
||||
"Text": "If you could improve one thing about your story today, what would it be?",
|
||||
"Options": [
|
||||
{
|
||||
"Id": "A",
|
||||
"Text": "Give the plot a clearer direction."
|
||||
},
|
||||
{
|
||||
"Id": "B",
|
||||
"Text": "Make the characters more convincing."
|
||||
},
|
||||
{
|
||||
"Id": "C",
|
||||
"Text": "Improve the flow between scenes and events."
|
||||
},
|
||||
{
|
||||
"Id": "D",
|
||||
"Text": "Make the story more exciting or emotionally powerful."
|
||||
},
|
||||
{
|
||||
"Id": "E",
|
||||
"Text": "Feel more confident that everything is consistent."
|
||||
},
|
||||
{
|
||||
"Id": "F",
|
||||
"Text": "I'm still unsure."
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
351
Docs/Writer/Investigations/Production-Evidence-Matrix-v0.1.md
Normal file
351
Docs/Writer/Investigations/Production-Evidence-Matrix-v0.1.md
Normal file
@ -0,0 +1,351 @@
|
||||
# Production evidence matrix v0.1
|
||||
|
||||
Authoritative structured export: `production-catalogue-v0.1.json`; exact wording fixture: `Production-Editorial-Source-v0.1.json`. All weights and limitations below are manually authored metadata, not manuscript analysis or calibrated probabilities.
|
||||
|
||||
## Evidence and completion contract
|
||||
|
||||
The qualified numeric requirements are unchanged: net support ≥4; ≥2 positive evidence dimensions; ≥2 independent groups; a relevant non-uncertain challenge opportunity; competing explanation examined; no unresolved material conflict; at least 8 substantive answers; maximum 12. Q01 contributes no evidence and does not count towards 8. A meaningful early ending may be qualified/healthy/uncertain before 8 when relevant questions are exhausted. No fixed recommendation is guaranteed.
|
||||
|
||||
Each real question has one evidence dimension and one independence group. Q17–Q19 all share `reported-concern` / `uncertain-route-signals`: the strongest sign is counted once, so three related preferences cannot masquerade as corroboration. Their positive weights are only +1. The shared strongest-sign/group and ±3 dimension aggregation is unchanged; healthy elements challenge problems and uncertain responses have no contribution. Q01 priors guide selection only and never count in the net threshold.
|
||||
|
||||
Schema 2 makes mixed-purpose challenge opportunities explicit: a question can discover a difficulty while offering a real disconfirming answer. Every declared challenge must contain a negative answer contribution for that hypothesis, validated at import. An uncertain response never fulfils that opportunity. This extends purpose metadata rather than lowering the challenge requirement or treating every question as a challenge. For example, Q05 explicitly offers clear reasons as a counterexample to unclear motivation.
|
||||
|
||||
Relevance links below are candidate hints only, not required data/prerequisite journeys or fixed next pointers. Active candidates come from the opening route, actual answered-option links and substantive leading explanations; ranking considers relevant hypotheses, dimension gaps and missing challenge opportunities, with ordinal ID ties. Healthy/uncertain answers generally stay within the present route rather than expanding blindly. Shared positive preference probes are not unnecessarily repeated. No book-data readiness or dependency graph is involved.
|
||||
|
||||
## Hypotheses and support boundaries
|
||||
|
||||
| Stable hypothesis | Author benefit / area | Confidence eligible in v0.1 | Real disconfirming question(s) | Capability mappings |
|
||||
|---|---|---|---|---|
|
||||
| disconnected | Disconnected plot events | Yes: actual path required | Q02, Q03 | threads, timeline |
|
||||
| causality | Weak cause and effect | Yes: actual path required | Q02, Q03 | threads |
|
||||
| agency | Passive protagonist | No: qualified/context only | Q03, Q07 | characters, threads |
|
||||
| direction | Unclear story direction | Yes: actual path required | Q04 | threads |
|
||||
| motivation | Unconvincing character motivation | Yes: actual path required | Q05 | characters |
|
||||
| development | Limited character development | No: qualified/context only | Q06 | characters |
|
||||
| relationships | Underdeveloped relationships | No: qualified/context only | Q07 | relationships |
|
||||
| slow | Slow or repetitive scenes | Yes: actual path required | Q09 | write, review |
|
||||
| rushed | Rushed events and consequences | Yes: actual path required | Q10 | write, review |
|
||||
| conflict | Weak conflict | Yes: actual path required | Q11, Q12 | threads, write |
|
||||
| stakes | Insufficient stakes | Yes: actual path required | Q12 | characters, write |
|
||||
| emotion | Weak emotional impact | Yes: actual path required | Q10, Q13 | review, write |
|
||||
| chronology | Chronology inconsistencies | No: qualified/context only | None supplied | timeline |
|
||||
| whereabouts | Character whereabouts problems | No: qualified/context only | None supplied | timeline |
|
||||
| knowledge | Character knowledge inconsistencies | No: qualified/context only | None supplied | timeline |
|
||||
| continuity | General continuity difficulties | Yes: actual path required | Q15 | timeline, characters |
|
||||
| unclear | Unresolved or unclear concern | No: qualified/context only | None supplied | None: non-diagnostic fallback |
|
||||
|
||||
The qualified/context-only areas lack enough distinct positive dimensions or a genuine disconfirming question. This is an explicit content limit; scores are still computed and practical guidance remains available. It is not a capability readiness decision. A healthy answer is not a conclusive declaration that the entire manuscript is sound.
|
||||
|
||||
## Every answer interpretation
|
||||
|
||||
| Question / answer | Exact answer | Contributions (hypothesis: signed strength) | Dimension / independence group | Candidate follow-ups | Limitations |
|
||||
|---|---|---|---|---|---|
|
||||
| Q01 / A | The plot doesn't seem to fit together or move forward. | Routing only | routing / q01 | Q02, Q03, Q04 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q01 / B | My characters or their decisions don't feel convincing. | Routing only | routing / q01 | Q05, Q06, Q07 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q01 / C | Some parts feel too slow, too rushed or uneven. | Routing only | routing / q01 | Q08, Q09, Q10 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q01 / D | The story doesn't have enough tension or emotional impact. | Routing only | routing / q01 | Q11, Q12, Q13 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q01 / E | I'm struggling to keep events, people or details consistent. | Routing only | routing / q01 | Q14, Q15, Q16 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q01 / F | Something feels wrong, but I can't identify what. | Routing only | routing / q01 | Q17, Q18, Q19 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q02 / A | Each important event leads naturally to another. | disconnected: -3, causality: -2 | event-connections / q02 | Q03, Q04 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q02 / B | Some events feel disconnected from the rest. | disconnected: +3, causality: +2 | event-connections / q02 | Q03, Q04, Q11, Q14 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q02 / C | I have plenty of events, but I'm not sure how they fit together. | disconnected: +1, direction: +1 | event-connections / q02 | Q03, Q04, Q11, Q14 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. Not knowing the arrangement is weak evidence only; it does not establish that events are disconnected. |
|
||||
| Q02 / D | I haven't worked out the main sequence of events yet. | Neutral / no evidence | event-connections / q02 | Q03, Q04 | A self-report, not manuscript evidence. Uncertain/unfinished development: no positive contribution. An unfinished event sequence is not proof of a writing defect. |
|
||||
| Q03 / A | My characters make decisions that change what happens next. | agency: -3, causality: -2, disconnected: -1 | story-driver / q03 | Q02, Q04 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q03 / B | Things happen to my characters, and they mostly react. | agency: +3, causality: +1 | story-driver / q03 | Q02, Q05, Q07, Q11 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q03 / C | New events keep appearing, but they don't always affect what came before. | disconnected: +3, causality: +3 | story-driver / q03 | Q02, Q05, Q07, Q11 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q03 / D | I'm not sure what drives the story forward. | Neutral / no evidence | story-driver / q03 | Q02, Q04 | A self-report, not manuscript evidence. Uncertain/unfinished development: no positive contribution. |
|
||||
| Q04 / A | I know what the main characters are working towards. | direction: -3 | direction / q04 | Q02, Q03 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q04 / B | I know the ending, but I'm struggling with the journey. | direction: +2 | direction / q04 | Q03, Q05, Q12, Q18 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q04 / C | I know the beginning, but not where the story is going. | direction: +3 | direction / q04 | Q03, Q05, Q12, Q18 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q04 / D | I have several possible directions and can't decide between them. | direction: +2 | direction / q04 | Q03, Q05, Q12, Q18 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q05 / A | Yes, their reasons are clear. | motivation: -3 | motives / q05 | Q06, Q07 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q05 / B | Usually, but some decisions feel difficult to justify. | motivation: +2 | motives / q05 | Q06, Q07, Q03, Q13, Q17 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q05 / C | I know what they do, but not always why. | motivation: +3 | motives / q05 | Q06, Q07, Q03, Q13, Q17 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q05 / D | I'm still discovering who these characters are. | Neutral / no evidence | motives / q05 | Q06, Q07 | A self-report, not manuscript evidence. Uncertain/unfinished development: no positive contribution. |
|
||||
| Q06 / A | Their experiences affect their attitudes, relationships or behaviour. | development: -3 | development / q06 | Q05, Q07 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q06 / B | Some characters develop, but others remain much the same. | development: +2 | development / q06 | Q05, Q07, Q10, Q13 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. Some characters may intentionally remain unchanged. This does not mean every character needs an arc. |
|
||||
| Q06 / C | They experience events, but don't seem changed by them. | development: +3 | development / q06 | Q05, Q07, Q10, Q13 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q06 / D | I haven't considered how they might change. | Neutral / no evidence | development / q06 | Q05, Q07 | A self-report, not manuscript evidence. Uncertain/unfinished development: no positive contribution. |
|
||||
| Q07 / A | Their relationships affect their choices and actions. | relationships: -3, agency: -1 | relationships / q07 | Q05, Q06 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q07 / B | The relationships matter emotionally but rarely affect events. | relationships: +2 | relationships / q07 | Q05, Q06, Q03, Q15 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. Emotionally important relationships need not always drive plot; this is a possibility to examine, not a rule. |
|
||||
| Q07 / C | The characters interact, but their relationships feel underdeveloped. | relationships: +3 | relationships / q07 | Q05, Q06, Q03, Q15 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q07 / D | I'm having trouble keeping track of how everyone relates. | continuity: +2 | relationships / q07 | Q05, Q06, Q03, Q15 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q08 / A | The beginning takes too long to get going. | slow: +2 | pacing-section / q08 | Q09, Q10, Q11, Q13 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q08 / B | The middle seems to lose momentum. | slow: +2 | pacing-section / q08 | Q09, Q10, Q11, Q13 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q08 / C | Important events happen too quickly. | rushed: +2 | pacing-section / q08 | Q09, Q10, Q11, Q13 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q08 / D | The pace varies unpredictably throughout the story. | slow: +1, rushed: +1 | pacing-section / q08 | Q09, Q10, Q11, Q13 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q08 / E | I can't identify a particular section. | Neutral / no evidence | pacing-section / q08 | Q09, Q10 | A self-report, not manuscript evidence. Uncertain/unfinished development: no positive contribution. |
|
||||
| Q09 / A | There's a lot of description or explanation. | slow: +2 | scene-content / q09 | Q08, Q10, Q11, Q02 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. Description is not inherently slow; this answer concerns scenes the author already experiences as slow. |
|
||||
| Q09 / B | Characters talk without much changing. | slow: +3, conflict: +1 | scene-content / q09 | Q08, Q10, Q11, Q02 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q09 / C | Events happen, but they don't seem important. | slow: +2 | scene-content / q09 | Q08, Q10, Q11, Q02 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q09 / D | I don't know which scenes are causing the problem. | Neutral / no evidence | scene-content / q09 | Q08, Q10 | A self-report, not manuscript evidence. Uncertain/unfinished development: no positive contribution. |
|
||||
| Q09 / E | My concern is rushing, rather than slowness. | rushed: +2, slow: -2 | scene-content / q09 | Q10, Q13, Q08 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q10 / A | Characters have time to react and events have lasting effects. | rushed: -3, emotion: -1 | consequences / q10 | Q08, Q09 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q10 / B | Sometimes I move to the next event too quickly. | rushed: +2, emotion: +1 | consequences / q10 | Q08, Q09, Q06, Q13 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q10 / C | I often skip reactions or consequences to keep the story moving. | rushed: +3, emotion: +2 | consequences / q10 | Q08, Q09, Q06, Q13 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q10 / D | I'm not sure how much space these moments need. | Neutral / no evidence | consequences / q10 | Q08, Q09 | A self-report, not manuscript evidence. Uncertain/unfinished development: no positive contribution. |
|
||||
| Q11 / A | There are clear obstacles that become more difficult. | conflict: -3 | obstacles / q11 | Q12, Q13 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q11 / B | There are obstacles, but they don't create much pressure. | conflict: +3 | obstacles / q11 | Q12, Q13, Q03, Q09 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q11 / C | Problems arise, but they're usually resolved quite easily. | conflict: +3, stakes: +1 | obstacles / q11 | Q12, Q13, Q03, Q09 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q11 / D | I'm not sure what the main obstacles are. | Neutral / no evidence | obstacles / q11 | Q12, Q13 | A self-report, not manuscript evidence. Uncertain/unfinished development: no positive contribution. |
|
||||
| Q12 / A | There are clear and significant consequences. | stakes: -3, conflict: -1 | stakes / q12 | Q11, Q13 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q12 / B | Something is at risk, but it doesn't feel especially important. | stakes: +2, conflict: +1 | stakes / q12 | Q11, Q13, Q04, Q05 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q12 / C | I'm not sure what they stand to lose. | Neutral / no evidence | stakes / q12 | Q11, Q13 | A self-report, not manuscript evidence. Uncertain/unfinished development: no positive contribution. |
|
||||
| Q12 / D | Failure doesn't currently have much consequence. | stakes: +3, conflict: +2 | stakes / q12 | Q11, Q13, Q04, Q05 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q13 / A | They feel convincing and have an impact. | emotion: -3 | emotion / q13 | Q11, Q12 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q13 / B | I know what the characters feel, but it doesn't always come across. | emotion: +3 | emotion / q13 | Q11, Q12, Q05, Q10, Q17 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q13 / C | Emotional moments happen, but feel rushed or understated. | emotion: +2, rushed: +2 | emotion / q13 | Q11, Q12, Q05, Q10, Q17 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q13 / D | I'm struggling to understand what the characters should feel. | Neutral / no evidence | emotion / q13 | Q11, Q12 | A self-report, not manuscript evidence. Uncertain/unfinished development: no positive contribution. |
|
||||
| Q14 / A | The order and timing of events. | chronology: +3, continuity: +1 | continuity-kind / q14 | Q16, Q15, Q02 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q14 / B | Where characters are and what they're doing. | whereabouts: +3, continuity: +1 | continuity-kind / q14 | Q16, Q15, Q07 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q14 / C | What different characters know at particular moments. | knowledge: +3, continuity: +1 | continuity-kind / q14 | Q16, Q15, Q07 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q14 / D | Personal details, relationships or previous events. | continuity: +3 | continuity-kind / q14 | Q15, Q16, Q02, Q07 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q14 / E | Several of these at once. | continuity: +3 | continuity-kind / q14 | Q15, Q16, Q02, Q07 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. Several does not mean all: only general continuity receives support, not every specific subtype. |
|
||||
| Q15 / A | I have organised notes or records that I maintain. | continuity: -1 | record-keeping / q15 | Q14, Q16 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. Maintained records weakly challenge organisational difficulty; they do not prove that story details are consistent. |
|
||||
| Q15 / B | I have notes, but they're scattered or incomplete. | continuity: +2 | record-keeping / q15 | Q14, Q16, Q07, Q17 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q15 / C | I mostly rely on remembering what I've written. | continuity: +1 | record-keeping / q15 | Q14, Q16, Q07, Q17 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. Relying on memory is context, not proof of errors; it contributes only weak support. |
|
||||
| Q15 / D | I keep rereading earlier chapters to check details. | continuity: +2 | record-keeping / q15 | Q14, Q16, Q07, Q17 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q16 / A | I changed something earlier without updating later events. | continuity: +3 | contradiction-cause / q16 | Q14, Q15, Q02, Q10 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q16 / B | I forgot a detail established previously. | continuity: +3 | contradiction-cause / q16 | Q14, Q15, Q02, Q10 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q16 / C | The timing or location of events doesn't work. | chronology: +1, whereabouts: +1, continuity: +2 | contradiction-cause / q16 | Q14, Q15, Q02, Q10 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. Timing OR location is ambiguous: each specific subtype receives only weak support; general continuity receives moderate support. |
|
||||
| Q16 / D | Different characters appear to know things they shouldn't. | knowledge: +3, continuity: +1 | contradiction-cause / q16 | Q14, Q15, Q02, Q10 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q16 / E | I haven't noticed a particular pattern. | Neutral / no evidence | contradiction-cause / q16 | Q14, Q15 | A self-report, not manuscript evidence. Uncertain/unfinished development: no positive contribution. |
|
||||
| Q17 / A | I lose interest in what happens next. | slow: +1, conflict: +1, stakes: +1 | reported-concern / uncertain-route-signals | Q02, Q03, Q04, Q18, Q19 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. Loss of interest has many possible causes; each contribution is weak and shares the preference-probe group. |
|
||||
| Q17 / B | I don't feel connected to the characters. | motivation: +1, emotion: +1 | reported-concern / uncertain-route-signals | Q05, Q06, Q07, Q18, Q19 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q17 / C | Some parts drag while others seem rushed. | slow: +1, rushed: +1 | reported-concern / uncertain-route-signals | Q08, Q09, Q10, Q18, Q19 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q17 / D | Things happen that don't seem believable or logical. | causality: +1 | reported-concern / uncertain-route-signals | Q11, Q12, Q13, Q18, Q19 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q17 / E | I notice inconsistencies and forgotten details. | continuity: +1 | reported-concern / uncertain-route-signals | Q14, Q15, Q16, Q18, Q19 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q17 / F | I can't identify anything specific. | Neutral / no evidence | reported-concern / uncertain-route-signals | Q18, Q19 | A self-report, not manuscript evidence. Uncertain/unfinished development: no positive contribution. |
|
||||
| Q18 / A | Deciding what should happen next. | direction: +1 | reported-concern / uncertain-route-signals | Q02, Q03, Q04, Q17, Q19 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q18 / B | Understanding what my characters would do. | motivation: +1 | reported-concern / uncertain-route-signals | Q05, Q06, Q07, Q17, Q19 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q18 / C | Turning ideas into effective scenes. | slow: +1 | reported-concern / uncertain-route-signals | Q08, Q09, Q10, Q17, Q19 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q18 / D | Making the story engaging or emotionally convincing. | emotion: +1, conflict: +1 | reported-concern / uncertain-route-signals | Q11, Q12, Q13, Q17, Q19 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q18 / E | Keeping track of everything I've already established. | continuity: +1 | reported-concern / uncertain-route-signals | Q14, Q15, Q16, Q17, Q19 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q18 / F | None of these describes my difficulty. | Neutral / no evidence | reported-concern / uncertain-route-signals | Q17, Q19 | A self-report, not manuscript evidence. Uncertain/unfinished development: no positive contribution. |
|
||||
| Q19 / A | Give the plot a clearer direction. | direction: +1 | reported-concern / uncertain-route-signals | Q02, Q03, Q04, Q17, Q18 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q19 / B | Make the characters more convincing. | motivation: +1 | reported-concern / uncertain-route-signals | Q05, Q06, Q07, Q17, Q18 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q19 / C | Improve the flow between scenes and events. | causality: +1, slow: +1 | reported-concern / uncertain-route-signals | Q08, Q09, Q10, Q17, Q18 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. Flow can concern pace or connections; both contributions are weak and do not establish a diagnosis. |
|
||||
| Q19 / D | Make the story more exciting or emotionally powerful. | emotion: +1, conflict: +1 | reported-concern / uncertain-route-signals | Q11, Q12, Q13, Q17, Q18 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q19 / E | Feel more confident that everything is consistent. | continuity: +1 | reported-concern / uncertain-route-signals | Q14, Q15, Q16, Q17, Q18 | A self-report, not manuscript evidence. A symptom can have several explanations; weights are not probabilities. |
|
||||
| Q19 / F | I'm still unsure. | Neutral / no evidence | reported-concern / uncertain-route-signals | Q17, Q18 | A self-report, not manuscript evidence. Uncertain/unfinished development: no positive contribution. |
|
||||
|
||||
## Versioned result templates
|
||||
|
||||
Each result is selected from the evaluated hypotheses and its declared conclusion states, never merely from Q01. Supporting observations quote the actual selected questions/options; superseded answers are removed from the live evidence. General state heading/explanation/action/qualification are also stored under `Editorial.States`, not generated from free text. Tools are offered only for supported, currently eligible recommendations. Tentative/conflicting/uncertain guidance offers practical work, not a tool represented as confidently recommended.
|
||||
|
||||
### disconnected
|
||||
|
||||
**Heading:** Some events may need stronger connections
|
||||
|
||||
**Explanation:** Your answers point towards disconnected plot events. The observations below show what informed that suggestion.
|
||||
|
||||
**Action:** Choose three important events. Write how each one changes the situation and makes the next event possible.
|
||||
|
||||
**Qualification:** This is based on your answers, not an analysis of your manuscript. Other explanations may fit.
|
||||
|
||||
**Applicable states:** tentative, ambiguous, conflicting, supported, unavailable.
|
||||
|
||||
### causality
|
||||
|
||||
**Heading:** Choices and consequences may need a clearer chain
|
||||
|
||||
**Explanation:** Your answers point towards weak cause and effect. The observations below show what informed that suggestion.
|
||||
|
||||
**Action:** For three important events, identify the decision that caused each event, what changed and what new difficulty followed.
|
||||
|
||||
**Qualification:** This is based on your answers, not an analysis of your manuscript. Other explanations may fit.
|
||||
|
||||
**Applicable states:** tentative, ambiguous, conflicting, supported, unavailable.
|
||||
|
||||
### agency
|
||||
|
||||
**Heading:** Your main character may need more influence over events
|
||||
|
||||
**Explanation:** Your answers point towards passive protagonist. The observations below show what informed that suggestion.
|
||||
|
||||
**Action:** Choose a turning point. Give the main character a consequential choice, then trace the new problem that choice creates.
|
||||
|
||||
**Qualification:** This is based on your answers, not an analysis of your manuscript. Other explanations may fit.
|
||||
|
||||
**Applicable states:** tentative, ambiguous, conflicting.
|
||||
|
||||
### direction
|
||||
|
||||
**Heading:** Your story may need a clearer direction
|
||||
|
||||
**Explanation:** Your answers point towards unclear story direction. The observations below show what informed that suggestion.
|
||||
|
||||
**Action:** Write one sentence about what the main character is trying to achieve. Sketch two possible next decisions and compare their consequences.
|
||||
|
||||
**Qualification:** This is based on your answers, not an analysis of your manuscript. Other explanations may fit.
|
||||
|
||||
**Applicable states:** tentative, ambiguous, conflicting, supported, unavailable.
|
||||
|
||||
### motivation
|
||||
|
||||
**Heading:** Some decisions may need clearer reasons
|
||||
|
||||
**Explanation:** Your answers point towards unconvincing character motivation. The observations below show what informed that suggestion.
|
||||
|
||||
**Action:** Choose one difficult decision. List what the character wants, what they fear losing and why this choice makes sense to them now.
|
||||
|
||||
**Qualification:** This is based on your answers, not an analysis of your manuscript. Other explanations may fit.
|
||||
|
||||
**Applicable states:** tentative, ambiguous, conflicting, supported, unavailable.
|
||||
|
||||
### development
|
||||
|
||||
**Heading:** Your characters may need more room to change
|
||||
|
||||
**Explanation:** Your answers point towards limited character development. The observations below show what informed that suggestion.
|
||||
|
||||
**Action:** Compare a character before and after three major events. Record what each experience changes in their behaviour, outlook or relationships.
|
||||
|
||||
**Qualification:** This is based on your answers, not an analysis of your manuscript. Other explanations may fit.
|
||||
|
||||
**Applicable states:** tentative, ambiguous, conflicting.
|
||||
|
||||
### relationships
|
||||
|
||||
**Heading:** Relationships may need to affect more of the story
|
||||
|
||||
**Explanation:** Your answers point towards underdeveloped relationships. The observations below show what informed that suggestion.
|
||||
|
||||
**Action:** Choose two characters. Identify what each wants from the other, where those wishes conflict and one decision that changes their relationship.
|
||||
|
||||
**Qualification:** This is based on your answers, not an analysis of your manuscript. Other explanations may fit.
|
||||
|
||||
**Applicable states:** tentative, ambiguous, conflicting.
|
||||
|
||||
### slow
|
||||
|
||||
**Heading:** Some scenes may need a clearer purpose
|
||||
|
||||
**Explanation:** Your answers point towards slow or repetitive scenes. The observations below show what informed that suggestion.
|
||||
|
||||
**Action:** Choose a slow scene. Note what changes between its beginning and end, then identify description or dialogue that does not contribute to that change.
|
||||
|
||||
**Qualification:** This is based on your answers, not an analysis of your manuscript. Other explanations may fit.
|
||||
|
||||
**Applicable states:** tentative, ambiguous, conflicting, supported, unavailable.
|
||||
|
||||
### rushed
|
||||
|
||||
**Heading:** Important events may need more room for their consequences
|
||||
|
||||
**Explanation:** Your answers point towards rushed events and consequences. The observations below show what informed that suggestion.
|
||||
|
||||
**Action:** Choose an important event. Add a beat for immediate reaction, a decision shaped by it and a later consequence. Compare the pace before cutting anything.
|
||||
|
||||
**Qualification:** This is based on your answers, not an analysis of your manuscript. Other explanations may fit.
|
||||
|
||||
**Applicable states:** tentative, ambiguous, conflicting, supported, unavailable.
|
||||
|
||||
### conflict
|
||||
|
||||
**Heading:** Obstacles may need to put more pressure on choices
|
||||
|
||||
**Explanation:** Your answers point towards weak conflict. The observations below show what informed that suggestion.
|
||||
|
||||
**Action:** Choose a goal and its main obstacle. Make progress require a difficult choice or cost, rather than resolving the obstacle immediately.
|
||||
|
||||
**Qualification:** This is based on your answers, not an analysis of your manuscript. Other explanations may fit.
|
||||
|
||||
**Applicable states:** tentative, ambiguous, conflicting, supported, unavailable.
|
||||
|
||||
### stakes
|
||||
|
||||
**Heading:** What is at risk may need to feel more concrete
|
||||
|
||||
**Explanation:** Your answers point towards insufficient stakes. The observations below show what informed that suggestion.
|
||||
|
||||
**Action:** Write what the main character could lose if they fail, why that loss matters to them and where the reader first sees that risk.
|
||||
|
||||
**Qualification:** This is based on your answers, not an analysis of your manuscript. Other explanations may fit.
|
||||
|
||||
**Applicable states:** tentative, ambiguous, conflicting, supported, unavailable.
|
||||
|
||||
### emotion
|
||||
|
||||
**Heading:** Emotional moments may need a stronger connection to action
|
||||
|
||||
**Explanation:** Your answers point towards weak emotional impact. The observations below show what informed that suggestion.
|
||||
|
||||
**Action:** Choose an emotional moment. Identify its trigger, show a specific reaction and let that feeling influence the character’s next decision.
|
||||
|
||||
**Qualification:** This is based on your answers, not an analysis of your manuscript. Other explanations may fit.
|
||||
|
||||
**Applicable states:** tentative, ambiguous, conflicting, supported, unavailable.
|
||||
|
||||
### chronology
|
||||
|
||||
**Heading:** The sequence and timing of events may need checking
|
||||
|
||||
**Explanation:** Your answers point towards chronology inconsistencies. The observations below show what informed that suggestion.
|
||||
|
||||
**Action:** Place the relevant events in order. Note elapsed time and check that each consequence occurs after its cause.
|
||||
|
||||
**Qualification:** This is based on your answers, not an analysis of your manuscript. Other explanations may fit.
|
||||
|
||||
**Applicable states:** tentative, ambiguous, conflicting.
|
||||
|
||||
### whereabouts
|
||||
|
||||
**Heading:** Character movement may need a clearer record
|
||||
|
||||
**Explanation:** Your answers point towards character whereabouts problems. The observations below show what informed that suggestion.
|
||||
|
||||
**Action:** For one complicated sequence, record where each character starts, how they move and when they arrive. Check that travel and overlapping actions are possible.
|
||||
|
||||
**Qualification:** This is based on your answers, not an analysis of your manuscript. Other explanations may fit.
|
||||
|
||||
**Applicable states:** tentative, ambiguous, conflicting.
|
||||
|
||||
### knowledge
|
||||
|
||||
**Heading:** Who knows what may need a closer check
|
||||
|
||||
**Explanation:** Your answers point towards character knowledge inconsistencies. The observations below show what informed that suggestion.
|
||||
|
||||
**Action:** Choose one revelation. List who learns it, how and when, then check earlier scenes for decisions that depend on knowing it.
|
||||
|
||||
**Qualification:** This is based on your answers, not an analysis of your manuscript. Other explanations may fit.
|
||||
|
||||
**Applicable states:** tentative, ambiguous, conflicting.
|
||||
|
||||
### continuity
|
||||
|
||||
**Heading:** Established details may need a more dependable record
|
||||
|
||||
**Explanation:** Your answers point towards general continuity difficulties. The observations below show what informed that suggestion.
|
||||
|
||||
**Action:** Choose a detail that changed. Record its current version, locate later scenes that depend on it and check those scenes against the same reference.
|
||||
|
||||
**Qualification:** This is based on your answers, not an analysis of your manuscript. Other explanations may fit.
|
||||
|
||||
**Applicable states:** tentative, ambiguous, conflicting, supported, unavailable.
|
||||
|
||||
### unclear
|
||||
|
||||
**Heading:** Start with one moment that does not feel right
|
||||
|
||||
**Explanation:** Your answers point towards unresolved or unclear concern. The observations below show what informed that suggestion.
|
||||
|
||||
**Action:** Choose a short passage. Note where your interest, understanding or emotional connection changes, then describe what you hoped the passage would achieve.
|
||||
|
||||
**Qualification:** This is based on your answers, not an analysis of your manuscript. Other explanations may fit.
|
||||
|
||||
**Applicable states:** healthy, uncertain.
|
||||
|
||||
## Capability verification boundary
|
||||
|
||||
The existing trusted adapters resolve scoped authenticated controllers/actions; answer data contains no URLs. `DestinationRegistry.cs` retains Characters.Index, Writer.Write, PlotLineWorkspace.Index, Timeline.Index and RelationshipMap.Index, and adds Writer.Review. Controllers and their existing services enforce project/book access again; investigations never bypass subscription/domain edit policies. Availability flags are re-evaluated before offering/opening a supported tool and do not modify diagnostic scores.
|
||||
|
||||
- Plot Lines: develop causal chains through recorded lines, threads and scene events (`PlotLine/Controllers/PlotLineWorkspaceController.cs`).
|
||||
- Characters: inspect and record motives/development in the project cast (`PlotLine/Controllers/CharactersController.cs:11`); this is project-scoped and retains the selected book context.
|
||||
- Relationships: develop recorded character connections (`PlotLine/Controllers/RelationshipMapController.cs`).
|
||||
- Write: compare scene/chapter intentions and develop meaningful change (`PlotLine/Controllers/WriterController.cs:19`).
|
||||
- Review: read accepted canonical manuscript and record observations/revision decisions (`PlotLine/Controllers/WriterController.cs:23`); no manuscript assessment is claimed by this questionnaire.
|
||||
- Timeline: inspect ordered scenes and recorded context (`PlotLine/Controllers/TimelineController.cs:12`, `PlotLine/Services/CoreServices.cs:2568`). Continuity/whereabouts/knowledge exercises are manual cross-checks; the questionnaire does not promise automatic contradiction detection or a scene occupant authoring feature.
|
||||
|
||||
These are deliberately bounded runtime adapters, not an implementation of the proposed Phase 3D.2A full registry. No planned/partial feature is recommended. Floor Plans occupancy authoring remains excluded. Public Solver URLs/content, Word Companion and Phase 3D.2A exports are untouched.
|
||||
271
Docs/Writer/Investigations/Production-Questionnaire-v0.1.md
Normal file
271
Docs/Writer/Investigations/Production-Questionnaire-v0.1.md
Normal file
@ -0,0 +1,271 @@
|
||||
# Production Guided Investigation questionnaire v0.1
|
||||
|
||||
Catalogue: `guided-investigation-production-v0.1`. Schema 2 / engine policy 3; results `results-v0.1`. Development deployment only.
|
||||
|
||||
The following 19 questions and 88 answers reproduce the supplied editorial wording exactly. Stable Q01–Q19 / A–F identifiers are stored in data. Q01 is represented by the persisted starting concern letter and immutable catalogue; it is not a scored answer or substantive question towards the minimum confidence length.
|
||||
|
||||
## Q01
|
||||
|
||||
**What concerns you most about your story at the moment?**
|
||||
|
||||
Help text: Choose whatever comes closest. We can explore the details together.
|
||||
|
||||
A. The plot doesn't seem to fit together or move forward.
|
||||
|
||||
B. My characters or their decisions don't feel convincing.
|
||||
|
||||
C. Some parts feel too slow, too rushed or uneven.
|
||||
|
||||
D. The story doesn't have enough tension or emotional impact.
|
||||
|
||||
E. I'm struggling to keep events, people or details consistent.
|
||||
|
||||
F. Something feels wrong, but I can't identify what.
|
||||
|
||||
## Q02
|
||||
|
||||
**When you look at the main events in your story, how well do they connect?**
|
||||
|
||||
A. Each important event leads naturally to another.
|
||||
|
||||
B. Some events feel disconnected from the rest.
|
||||
|
||||
C. I have plenty of events, but I'm not sure how they fit together.
|
||||
|
||||
D. I haven't worked out the main sequence of events yet.
|
||||
|
||||
## Q03
|
||||
|
||||
**What usually drives your story forward?**
|
||||
|
||||
A. My characters make decisions that change what happens next.
|
||||
|
||||
B. Things happen to my characters, and they mostly react.
|
||||
|
||||
C. New events keep appearing, but they don't always affect what came before.
|
||||
|
||||
D. I'm not sure what drives the story forward.
|
||||
|
||||
## Q04
|
||||
|
||||
**How clear is the direction of your story?**
|
||||
|
||||
A. I know what the main characters are working towards.
|
||||
|
||||
B. I know the ending, but I'm struggling with the journey.
|
||||
|
||||
C. I know the beginning, but not where the story is going.
|
||||
|
||||
D. I have several possible directions and can't decide between them.
|
||||
|
||||
## Q05
|
||||
|
||||
**Do you understand why your main characters make their important decisions?**
|
||||
|
||||
A. Yes, their reasons are clear.
|
||||
|
||||
B. Usually, but some decisions feel difficult to justify.
|
||||
|
||||
C. I know what they do, but not always why.
|
||||
|
||||
D. I'm still discovering who these characters are.
|
||||
|
||||
## Q06
|
||||
|
||||
**How do your main characters change as the story progresses?**
|
||||
|
||||
A. Their experiences affect their attitudes, relationships or behaviour.
|
||||
|
||||
B. Some characters develop, but others remain much the same.
|
||||
|
||||
C. They experience events, but don't seem changed by them.
|
||||
|
||||
D. I haven't considered how they might change.
|
||||
|
||||
## Q07
|
||||
|
||||
**How well do your characters' relationships influence the story?**
|
||||
|
||||
A. Their relationships affect their choices and actions.
|
||||
|
||||
B. The relationships matter emotionally but rarely affect events.
|
||||
|
||||
C. The characters interact, but their relationships feel underdeveloped.
|
||||
|
||||
D. I'm having trouble keeping track of how everyone relates.
|
||||
|
||||
## Q08
|
||||
|
||||
**Where does the pacing trouble you most?**
|
||||
|
||||
A. The beginning takes too long to get going.
|
||||
|
||||
B. The middle seems to lose momentum.
|
||||
|
||||
C. Important events happen too quickly.
|
||||
|
||||
D. The pace varies unpredictably throughout the story.
|
||||
|
||||
E. I can't identify a particular section.
|
||||
|
||||
## Q09
|
||||
|
||||
**What happens in the scenes that feel slow?**
|
||||
|
||||
A. There's a lot of description or explanation.
|
||||
|
||||
B. Characters talk without much changing.
|
||||
|
||||
C. Events happen, but they don't seem important.
|
||||
|
||||
D. I don't know which scenes are causing the problem.
|
||||
|
||||
E. My concern is rushing, rather than slowness.
|
||||
|
||||
## Q10
|
||||
|
||||
**When an important event occurs, how much room do you give its consequences?**
|
||||
|
||||
A. Characters have time to react and events have lasting effects.
|
||||
|
||||
B. Sometimes I move to the next event too quickly.
|
||||
|
||||
C. I often skip reactions or consequences to keep the story moving.
|
||||
|
||||
D. I'm not sure how much space these moments need.
|
||||
|
||||
## Q11
|
||||
|
||||
**What stands in the way of your main character achieving what they want?**
|
||||
|
||||
A. There are clear obstacles that become more difficult.
|
||||
|
||||
B. There are obstacles, but they don't create much pressure.
|
||||
|
||||
C. Problems arise, but they're usually resolved quite easily.
|
||||
|
||||
D. I'm not sure what the main obstacles are.
|
||||
|
||||
## Q12
|
||||
|
||||
**What happens if your main character fails?**
|
||||
|
||||
A. There are clear and significant consequences.
|
||||
|
||||
B. Something is at risk, but it doesn't feel especially important.
|
||||
|
||||
C. I'm not sure what they stand to lose.
|
||||
|
||||
D. Failure doesn't currently have much consequence.
|
||||
|
||||
## Q13
|
||||
|
||||
**How do you feel about the emotional moments in your story?**
|
||||
|
||||
A. They feel convincing and have an impact.
|
||||
|
||||
B. I know what the characters feel, but it doesn't always come across.
|
||||
|
||||
C. Emotional moments happen, but feel rushed or understated.
|
||||
|
||||
D. I'm struggling to understand what the characters should feel.
|
||||
|
||||
## Q14
|
||||
|
||||
**What are you finding hardest to keep consistent?**
|
||||
|
||||
A. The order and timing of events.
|
||||
|
||||
B. Where characters are and what they're doing.
|
||||
|
||||
C. What different characters know at particular moments.
|
||||
|
||||
D. Personal details, relationships or previous events.
|
||||
|
||||
E. Several of these at once.
|
||||
|
||||
## Q15
|
||||
|
||||
**How do you currently keep track of story details?**
|
||||
|
||||
A. I have organised notes or records that I maintain.
|
||||
|
||||
B. I have notes, but they're scattered or incomplete.
|
||||
|
||||
C. I mostly rely on remembering what I've written.
|
||||
|
||||
D. I keep rereading earlier chapters to check details.
|
||||
|
||||
## Q16
|
||||
|
||||
**When you discover a contradiction, what usually caused it?**
|
||||
|
||||
A. I changed something earlier without updating later events.
|
||||
|
||||
B. I forgot a detail established previously.
|
||||
|
||||
C. The timing or location of events doesn't work.
|
||||
|
||||
D. Different characters appear to know things they shouldn't.
|
||||
|
||||
E. I haven't noticed a particular pattern.
|
||||
|
||||
## Q17
|
||||
|
||||
**When you reread your story, what bothers you most?**
|
||||
|
||||
A. I lose interest in what happens next.
|
||||
|
||||
B. I don't feel connected to the characters.
|
||||
|
||||
C. Some parts drag while others seem rushed.
|
||||
|
||||
D. Things happen that don't seem believable or logical.
|
||||
|
||||
E. I notice inconsistencies and forgotten details.
|
||||
|
||||
F. I can't identify anything specific.
|
||||
|
||||
## Q18
|
||||
|
||||
**Which part of writing the story feels most difficult right now?**
|
||||
|
||||
A. Deciding what should happen next.
|
||||
|
||||
B. Understanding what my characters would do.
|
||||
|
||||
C. Turning ideas into effective scenes.
|
||||
|
||||
D. Making the story engaging or emotionally convincing.
|
||||
|
||||
E. Keeping track of everything I've already established.
|
||||
|
||||
F. None of these describes my difficulty.
|
||||
|
||||
## Q19
|
||||
|
||||
**If you could improve one thing about your story today, what would it be?**
|
||||
|
||||
A. Give the plot a clearer direction.
|
||||
|
||||
B. Make the characters more convincing.
|
||||
|
||||
C. Improve the flow between scenes and events.
|
||||
|
||||
D. Make the story more exciting or emotionally powerful.
|
||||
|
||||
E. Feel more confident that everything is consistent.
|
||||
|
||||
F. I'm still unsure.
|
||||
|
||||
## Storage and compatibility
|
||||
|
||||
`Production-Editorial-Source-v0.1.json` is the frozen wording fixture. `production-catalogue-v0.1.json` is the validated database publication export, including evidence, relevance links, results and trusted capability IDs. `Tools/WriterInvestigations/build_production_v01.py` reproduces the export from the source and explicitly authored metadata; it does not generate additional questions or call any model. Runtime reads immutable database JSON through the established Dapper/stored procedure repository.
|
||||
|
||||
The ordinary author catalogue is explicitly selected by `WriterInvestigations:AuthorCatalogue` (default this version), independently of the most recently published developer catalogue. Existing investigations retain their exact original catalogue and answer identifiers. Synthetic archives remain private developer/admin-only tests; they are not shown in ordinary author lists or ordinary direct URLs. They are preserved rather than reinterpreted/deleted. AdminOnly access also requires original author ownership and book access. Production deployment/activation remains disabled.
|
||||
|
||||
## Editorial limitations requiring later review
|
||||
|
||||
Q08, Q09 and Q14 frame an already reported difficulty rather than offering a universal no-problem answer. Q14 has neither a no-difficulty nor an unsure option. Q15 and Q07 also lack an unsure choice. Therefore a Continuity author who answers Q14 is necessarily identifying a difficulty; it would be dishonest to discard that answer to manufacture a clean no-problem/wholly-uncertain result. The acceptance report distinguishes a qualified observation from confirmed faults, and records which actual alternatives were selected where no uncertain answer exists. No wording or answer was added to conceal this limit.
|
||||
|
||||
Several diagnostic areas have only one direct independent question or no genuine disconfirming answer in these 19 items. They receive specific qualified guidance, not invented confidence. Further wording/corroboration or healthy/uncertain options require editorial approval in a later catalogue version. The supplied text is unchanged.
|
||||
3132
Docs/Writer/Investigations/production-catalogue-v0.1.json
Normal file
3132
Docs/Writer/Investigations/production-catalogue-v0.1.json
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,63 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"catalogue": "guided-investigation-production-v0.1",
|
||||
"questions": 19,
|
||||
"answers": 88,
|
||||
"paths": 127,
|
||||
"reachableFindings": [
|
||||
"disconnected",
|
||||
"causality",
|
||||
"direction",
|
||||
"continuity",
|
||||
"motivation",
|
||||
"slow",
|
||||
"rushed",
|
||||
"conflict",
|
||||
"emotion",
|
||||
"stakes"
|
||||
],
|
||||
"outcomes": {
|
||||
"supported": 35,
|
||||
"ambiguous": 12,
|
||||
"healthy": 57,
|
||||
"tentative": 12,
|
||||
"uncertain": 11
|
||||
},
|
||||
"verbatimSourceSha256": "54737bc3126b31cc6824ef5b3b885ee0ba798c122dee03420616a100130d4d7e",
|
||||
"routeOutcomes": {
|
||||
"A": {
|
||||
"supported": 4,
|
||||
"ambiguous": 4,
|
||||
"healthy": 14
|
||||
},
|
||||
"B": {
|
||||
"healthy": 13,
|
||||
"ambiguous": 3,
|
||||
"supported": 3,
|
||||
"tentative": 2
|
||||
},
|
||||
"C": {
|
||||
"healthy": 13,
|
||||
"supported": 6,
|
||||
"uncertain": 1,
|
||||
"tentative": 1
|
||||
},
|
||||
"D": {
|
||||
"healthy": 13,
|
||||
"supported": 6,
|
||||
"uncertain": 1,
|
||||
"tentative": 1
|
||||
},
|
||||
"E": {
|
||||
"supported": 9,
|
||||
"ambiguous": 5,
|
||||
"tentative": 7
|
||||
},
|
||||
"F": {
|
||||
"uncertain": 9,
|
||||
"healthy": 4,
|
||||
"supported": 7,
|
||||
"tentative": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
Docs/Writer/Writer3/Evidence/Phase3D1B/simulation.json.gz
Normal file
BIN
Docs/Writer/Writer3/Evidence/Phase3D1B/simulation.json.gz
Normal file
Binary file not shown.
63
Docs/Writer/Writer3/Phase3D1B-Acceptance-Report.md
Normal file
63
Docs/Writer/Writer3/Phase3D1B-Acceptance-Report.md
Normal file
@ -0,0 +1,63 @@
|
||||
# Phase 3D.1B — Production Guided Investigation v0.1
|
||||
|
||||
Shared branch: `codex/word-companion-native-phase1-20261104`. Baseline `e56e300` / deployed application `283f6fd`. This phase authors the first editorial catalogue and integrates it on Development; it does not activate Production or implement Phase 3D.2B.
|
||||
|
||||
## Implementation and editorial identity
|
||||
|
||||
`guided-investigation-production-v0.1` contains **19 questions, 88 exact answer labels, six opening routes, 17 diagnostic areas, 17 area-specific result templates, seven conclusion-state templates and six verified capability adapters**. The questionnaire reproduces the supplied text verbatim, including Q01 help. Frozen text: [questionnaire](../Investigations/Production-Questionnaire-v0.1.md), [source fixture](../Investigations/Production-Editorial-Source-v0.1.json). Publication export: [production catalogue](../Investigations/production-catalogue-v0.1.json). Full per-answer interpretations, signed weights, groups, follow-ups, limitations and result wording: [evidence matrix](../Investigations/Production-Evidence-Matrix-v0.1.md).
|
||||
|
||||
The engine remains generic, deterministic and independent of writing wording/destinations. Schema 2 / engine policy 3 adds data-driven route/relevance candidates, mixed-purpose challenge metadata, explicit qualified-only content limits, and authored state/area results. Question selection ranks actual eligible candidates from the opening route, selected-answer relevance links and leading substantive explanations; it is not a fixed next pointer or sequential nineteen-question script. Ordinal IDs break ties. Healthy and uncertain answers normally stay within their present area. Q17–Q19 share a single dimension and independence group; the strongest related contribution is +1 once, not three independent confirmations. Q01 is routing only, represented by the persisted concern letter plus immutable opening-question metadata, and does not count towards confidence length.
|
||||
|
||||
**Confidence is unchanged:** net evidence ≥4, ≥2 positive dimensions, ≥2 corroboration groups, a non-uncertain genuine disconfirming opportunity, an examined competitor, no unresolved material conflict, and ≥8 substantive answers. The existing 12-answer upper bound remains. Challenge opportunities are explicitly declared only where an answer actually challenges the named hypothesis. A question may examine the problem and its counterexample; for example Q05 offers clear motives as an alternative to unclear motives. Uncertainty itself has no positive evidence. Strongest-sign/group and ±3 dimension caps are unchanged. A short healthy/uncertain/qualified investigation may finish before eight when relevant candidates are exhausted; that does not bypass supported-recommendation thresholds.
|
||||
|
||||
Every result contains an answer-based heading/explanation, actual supporting observations, a concrete writing action, an explicit questionnaire-vs-manuscript qualification, and revision/save/further controls as applicable. Tool actions appear only for supported findings with eligible adapters. Tentative results offer exercises without presenting unsupported tools as confidently recommended. Opposing reports about different aspects are retained and can produce an ambiguous interpretation rather than being forced into a healthy conclusion or automatically labelled an error. Result wording and its applicable conclusion states are versioned catalogue data, not AI-generated prose.
|
||||
|
||||
## Synthetic isolation and historical compatibility
|
||||
|
||||
The ordinary author catalogue is explicitly pinned by `WriterInvestigations:AuthorCatalogue` (default this production version), independent of the most recently published developer catalogue. A later synthetic publication cannot replace it. Synthetic creation/viewing/answering/opening is restricted to Development AdminOnly users and remains author-owned/book-authorised; ordinary saved lists exclude synthetic records and ordinary synthetic URLs/explicit version overrides return404. Admin catalogue selection retains the original synthetic test workflow. This is deliberate archival isolation, not deletion: old JSON, IDs, answers, events and original engine0/2 policies are retained. Existing production investigations remain bound to their original catalogue and saved-list labels are resolved from that original version. No answer is reinterpreted using another version's IDs.
|
||||
|
||||
The existing 633-state legacy replay qualification and 228-path synthetic simulator remain green. Private persistence, optimistic versions, resumability and answer replacement use the established Dapper/stored procedures. Production and synthetic records coexist without schema/data rewrites. The feature remains Development-gated; a production-content catalogue identity is not Production activation.
|
||||
|
||||
## Capability safeguards and scope
|
||||
|
||||
Trusted authenticated adapters: Characters.Index, PlotLineWorkspace.Index, Timeline.Index, RelationshipMap.Index, Writer.Write and Writer.Review. The first five are the qualified existing adapters; Review is a new trusted adapter to the implemented canonical reading/observations workspace. The evidence matrix records source evidence and scope. Project-wide cast remains project-wide while retaining the selected book. Timeline guidance means a manual cross-check of recorded scenes/context, not automatic knowledge or continuity analysis. No planned/partial capability, public Solver URL, Floor Plans occupant authoring or manuscript analysis is claimed.
|
||||
|
||||
A necessary multi-tool safeguard was added: `Open` now checks the **specific adapter's current availability**, as well as the finding's recommendation and trusted resolver. A runtime-disabled tool cannot be forged through a finding whose alternative tool is still eligible. Eligibility/configuration changes do not modify numeric diagnostic evidence. No readiness data or preparation planner is introduced.
|
||||
|
||||
## Automated qualification
|
||||
|
||||
- Normal solution build: zero warnings/errors.
|
||||
- Full executable regression harness: exit0 / 605 PASS records, including public Writing Problem Solver, existing Writer/Word and legacy investigation cases.
|
||||
- Production simulation: **127 deterministic completed paths**, including all six openings, targeted strong/moderate/healthy/uncertain/mixed patterns, six requested cross-route examples and a contrasting-accounts case. No forced question presentation or fabricated evidence; every answer uses the evaluator's actual next question and a real A–F option.
|
||||
- Every opening has a demonstrated supported result and a qualified/ambiguous result. All **10 confidence-eligible findings** are actually reachable; all **17 area templates** are exercised, including the uncertain fallback. Seven areas are deliberately qualified/context-only where these questions cannot meet independence/challenge requirements.
|
||||
- Validation covers exact editorial wording, IDs/counts, version/schema, reference integrity, weights, actual challenge alternatives, related-probe grouping, orphaned questions/results, allowed result states and trusted capability mappings. Invalid catalogues are rejected, never silently repaired.
|
||||
- Regression checks cover answer revision, private save/resume, cross-user/book isolation, deterministic replay, unavailable capabilities without rescoring, unavailable individual adapters within a multi-tool finding, early safe endings and preserved legacy catalogue semantics.
|
||||
- Migration274 publication smoke: editorial format accepted, immutable duplicate rejected, test publication completely rolled back. No author investigation was changed by the smoke.
|
||||
|
||||
Machine answer sequences and evaluation states: [simulation](Evidence/Phase3D1B/simulation.json.gz). This is bounded representative coverage, not exhaustive enumeration or statistically calibrated literary diagnosis. Case names are policy descriptions, not diagnoses: an “uncertain” simulation uses a real neutral/healthy alternative where the supplied item has no unsure choice; it never invents an answer.
|
||||
|
||||
## Representative editorial results
|
||||
|
||||
The selected supported witnesses cover plot connections/cause and effect from Plot, motives from Characters, scene purpose from Pacing, conflict from Tension, continuity from Consistency, and a cross-route character finding from the unsure opening. A supported result remains distinguishable from competing possible explanations, a qualified observation, genuine uncertainty, no clear problem identified and an unavailable tool.
|
||||
|
||||
The named examples exercise passive choices/disconnected events, motivation/development, slow middle/dialogue without change, weak pressure/stakes, earlier changes/chronology, and unsure-to-character reasoning. Some correctly remain qualified or competing rather than forcing confidence. Exact paths, contributions and result text are in the machine export and final receipts.
|
||||
|
||||
## Necessary content limitations
|
||||
|
||||
The supplied nineteen items cannot legitimately support high confidence for **protagonist agency, character development, relationships, chronology, whereabouts, character knowledge or the unresolved fallback** under the unchanged requirements: they lack either independent positive dimensions or a real disconfirming question. Their specific exercises and observations remain available. Ten other areas have witnessed supported paths. This limitation is not hidden by relabelling correlations or weakening thresholds.
|
||||
|
||||
Q14 requires identifying a consistency difficulty and offers neither a no-difficulty nor an unsure option. Q07/Q15 also lack an unsure answer; Q08/Q09 frame a reported pacing concern. In particular, a Continuity author who answers Q14 has necessarily reported a difficulty. The safe healthy/uncertain test policy therefore yields a **qualified continuity/chronology observation**, not a manufactured clean no-problem/wholly-uncertain result. Actual alternatives and this acceptance boundary are explicitly recorded. Other routes demonstrate healthy or genuinely uncertain outcomes where their supplied answers permit them. Editorial approval of neutral/healthy choices and additional independent challenge/corroboration questions would be needed to close this gap; no supplied text was altered to hide it.
|
||||
|
||||
Strong independent questions need further editorial validation; weights are not probabilities. Descriptive scenes, reactive protagonists or unchanged characters may be intentional. “Timing or location” has only weak subtype evidence because the answer is an OR; general continuity receives the stronger contribution. Free text is stored but never interpreted. Investigation exercise wording does not claim to assess manuscript content. Physical installed PWA, Windows/Office and a screen-reader audit remain outside headless desktop/responsive simulated PWA qualification.
|
||||
|
||||
## Browser/PWA, rollout and data preservation
|
||||
|
||||
The final isolated real-MVC browser qualification passed 36 author cases plus AdminOnly synthetic isolation with Review explicitly disabled and Write available. Hidden-adapter forged requests are rejected with400. The normal-availability isolated run also passed. Development rollout and authenticated acceptance receipts are pending and will be filled in the reporting commit after verification. Disposable fixtures will be removed after acceptance.
|
||||
|
||||
Migration `274_WriterEditorialCatalogues.sql` changes only the immutable catalogue publication procedure to permit validated schema2 editorial JSON alongside schema1 synthetic JSON. It does not rewrite numbered273, add entity tables, change existing catalogue payloads, or migrate answers. A copy-only/checksum backup and RESTORE VERIFYONLY were completed before writes; verification used the existing privileged container helper because the normal application principal lacks VERIFY permission. No permissions were broadened and no restore/reset occurred.
|
||||
|
||||
Rollback must retain a build understanding schema2 / engine3 and the bound catalogue, or disable the investigation feature; restoring an older binary alone cannot parse the new catalogue. The production-content record will be published only after the compatible Development application is running. Configuration, uploads, keys and logs will be preserved.
|
||||
|
||||
## Review checkpoint
|
||||
|
||||
Review the exact questionnaire, evidence matrix and qualified-only/no-neutral-choice boundaries before wider rollout or further editorial additions. Dependency registry/readiness/preparation work remains the separately approved Phase3D.2B; no such implementation was started. Public Solver content/routes/SEO, Word Companion binaries and Phase3D.2A exports are preserved. Stop for review.
|
||||
23
PlotLine.Tests/Browser/writer3-production-investigations.cjs
Normal file
23
PlotLine.Tests/Browser/writer3-production-investigations.cjs
Normal file
@ -0,0 +1,23 @@
|
||||
const {chromium}=require('playwright'),fs=require('fs'),assert=require('node:assert/strict');
|
||||
const base=process.env.PD_INV_BASE||'http://127.0.0.1:5238',identity=process.env.PD_INV_IDENTITY?JSON.parse(fs.readFileSync(process.env.PD_INV_IDENTITY)):null,w=identity||{UserID:4,book:12,other:13,project:7};
|
||||
const c=JSON.parse(fs.readFileSync('Docs/Writer/Investigations/production-catalogue-v0.1.json')),report=JSON.parse(fs.readFileSync(process.env.PD_INV_TRACE||'/tmp/production-investigation-paths.json'));
|
||||
const wanted={A:'disconnected',B:'motivation',C:'slow',D:'conflict',E:'continuity',F:'motivation'};
|
||||
(async()=>{const b=await chromium.launch();try{for(const pwa of[false,true]){const context=await b.newContext({viewport:{width:pwa?390:1440,height:pwa?844:1000}});await context.addInitScript(({u,pwa})=>{localStorage.setItem('plotdirector.desktop.v1.'+u,JSON.stringify({dismissedAt:Date.now()}));if(pwa)Object.defineProperty(navigator,'standalone',{value:true});},{u:w.UserID,pwa});const p=await context.newPage(),errors=[],external=[];p.on('pageerror',e=>errors.push(e.message));p.on('request',r=>{if(/openai|anthropic|inference|generativelanguage/i.test(r.url()))external.push(r.url());});
|
||||
if(identity){await p.goto(base+'/Account/Login');await p.locator('[name=Email]').fill(w.Email);await p.locator('[name=Password]').fill(w.Password);await Promise.all([p.waitForURL('**/Projects'),p.locator('button[type=submit]').click()]);}
|
||||
for(const route of'ABCDEF')for(const pattern of['supported','qualified','uncertain']){
|
||||
const paths=report.paths.filter(x=>x.concern===route);const path=pattern==='supported'?paths.find(x=>x.target===wanted[route]&&x.final.Recommendations.length):pattern==='qualified'?(paths.find(x=>x.target==='qualified'&&['tentative','ambiguous'].includes(x.result.Kind))||paths.find(x=>['tentative','ambiguous'].includes(x.result.Kind))):paths.find(x=>x.target==='uncertain');assert(path,'real evaluator witness '+route+'/'+pattern);
|
||||
await p.goto(`${base}/Writer/Explore?projectId=${w.project}&bookId=${w.book}`);await p.getByRole('link',{name:'Explore a concern',exact:true}).click();assert.equal((await p.locator('#investigation-question').textContent()).trim(),c.Questions[0].Text);for(const option of c.Questions[0].Options)assert.equal((await p.locator(`label:has([name=concern][value=${option.Id}])`).textContent()).trim(),option.Text);
|
||||
await p.locator(`[name=concern][value=${route}]`).check();await p.getByRole('button',{name:'Begin',exact:true}).click();const url=p.url(),id=new URL(url).searchParams.get('id');
|
||||
await p.locator('#investigation-explanation').fill('Unfinished editorial acceptance note');await p.getByRole('button',{name:'Save for later',exact:true}).click();await p.reload();assert.equal(await p.locator('#investigation-explanation').inputValue(),'Unfinished editorial acceptance note');
|
||||
for(let n=0;n<path.answers.length;n++){const a=path.answers[n],q=c.Questions.find(q=>q.Id===a.Question),form=p.locator('[data-investigation-answer]');assert.equal(await form.locator('[name=question]').inputValue(),q.Id);assert.equal((await p.locator('#investigation-question').textContent()).trim(),q.Text);for(const o of q.Options)assert.equal((await form.locator(`label:has([name=option][value=${o.Id}])`).textContent()).trim(),o.Text);await form.locator(`[name=option][value=${a.Option}]`).check();await form.locator(`button[value=${n===1?'save':'answer'}]`).click();if(n===1){await p.goto(`${base}/Writer/Explore/Investigate?bookId=${w.book}`);await p.locator(`aside a[href*="${id}"]`).click();}}
|
||||
assert.equal(await p.locator('[data-investigation-answer]').count(),0);assert.equal(await p.locator('#investigation-question').getAttribute('data-conclusion'),path.result.Kind);assert((await p.locator('[data-writing-action]').first().textContent()).trim().length>20);assert(await p.locator('[data-supporting-observations] li').count()>0);const body=await p.locator('body').textContent();assert(/not an analysis of your manuscript/.test(body));assert(!/synthetic|hypothesis|corroboration|threshold|test catalogue|net evidence|tentative-only/i.test(body));assert.equal(await p.locator('iframe').count(),0);assert(await p.evaluate(()=>document.documentElement.scrollWidth<=innerWidth+2));
|
||||
if(path.final.Recommendations.length){const forms=p.locator('form[action$="/Open"]');assert(await forms.count()>0);const ids=await forms.locator('[name=capability]').evaluateAll(xs=>[...new Set(xs.map(x=>x.value))]);for(const capability of ids){await p.reload();const f=p.locator('form[action$="/Open"]').filter({has:p.locator(`[name=capability][value="${capability}"]`)}).first(),data=await f.evaluate(f=>Object.fromEntries(new FormData(f)));data.capability=capability;const response=await p.request.post(base+'/Writer/Explore/Investigate/Open',{form:data,maxRedirects:0});assert.equal(response.status(),302);const dest=response.headers().location;assert(!/solver|writing-problems/i.test(dest));assert(dest.includes('projectId='+w.project)&&dest.includes('bookId='+w.book));if(identity)assert.equal((await p.request.get(new URL(dest,base).href)).status(),200);}await p.reload();const hidden=c.Hypotheses.filter(h=>path.final.Recommendations.includes(h.Id)).flatMap(h=>h.Capabilities).filter(id=>!ids.includes(id));for(const capability of hidden){const f=p.locator('form[action$="/Open"]').first(),data=await f.evaluate(f=>Object.fromEntries(new FormData(f)));data.capability=capability;assert.equal((await p.request.post(base+'/Writer/Explore/Investigate/Open',{form:data,maxRedirects:0})).status(),400);}}else assert.equal(await p.locator('form[action$="/Open"]').count(),0);
|
||||
if(process.env.PD_INV_SCREENSHOTS&&!pwa){fs.mkdirSync(process.env.PD_INV_SCREENSHOTS,{recursive:true});await p.screenshot({path:process.env.PD_INV_SCREENSHOTS+'/'+route+'-'+pattern+'.png'});}
|
||||
assert.equal((await p.request.get(`${base}/Writer/Explore/Investigate?bookId=${w.other}&id=${id}`)).status(),404);
|
||||
const revise=path.answers.find(a=>c.Questions.find(q=>q.Id===a.Question).Options.find(o=>o.Id===a.Option).Contributions.some(v=>v.Weight>0))||path.answers[0],q=c.Questions.find(q=>q.Id===revise.Question),next=q.Options.find(o=>o.Id!==revise.Option);await p.goto(url+'&question='+q.Id);await p.locator(`[name=option][value=${next.Id}]`).check();await p.locator('button[value=answer]').click();await p.goto(url+'&question='+q.Id);assert(await p.locator(`[name=option][value=${next.Id}]`).isChecked());await p.reload();assert(await p.locator(`[name=option][value=${next.Id}]`).isChecked());
|
||||
if(!identity){const other=await b.newContext();await other.addCookies([{name:'fixture-user',value:'5',url:base}]);assert.equal((await other.request.get(url)).status(),404);await other.close();}
|
||||
console.log(`PASS ${identity?'Development':'isolated'} ${pwa?'simulated PWA':'browser'} ${route}/${pattern}: ${path.result.Kind}; exact wording, scoped tool, useful action, observations, save/resume, revision, private book`);
|
||||
}
|
||||
assert.equal((await p.request.get(`${base}/Writer/Explore/Investigate?bookId=${w.book}&catalogueVersion=synthetic-3d1-v1`)).status(),404);
|
||||
if(!identity&&!pwa){assert.equal((await p.request.get(base+'/admin/writer-investigations')).status(),403);await context.addCookies([{name:'solver-reviewer',value:'true',url:base}]);const admin=await p.request.get(base+'/admin/writer-investigations'),token=(await admin.text()).match(/name="__RequestVerificationToken"[^>]*value="([^"]+)"/)[1];const old=fs.readFileSync('Docs/Writer/Investigations/synthetic-catalogue.json','utf8');assert.equal((await p.request.post(base+'/admin/writer-investigations',{form:{json:old,operation:'publish',__RequestVerificationToken:token}})).status(),200);await p.goto(`${base}/Writer/Explore/Investigate?bookId=${w.book}`);assert.equal((await p.locator('#investigation-question').textContent()).trim(),c.Questions[0].Text);await p.goto(`${base}/Writer/Explore/Investigate?bookId=${w.book}&catalogueVersion=synthetic-3d1-v1`);await p.locator('[name=concern][value=story]').check();await p.getByRole('button',{name:'Begin',exact:true}).click();const legacyUrl=p.url();assert((await p.locator('body').textContent()).includes('small test catalogue'));await context.clearCookies({name:'solver-reviewer'});assert.equal((await p.request.get(legacyUrl)).status(),404);console.log('PASS latest synthetic publication cannot replace author catalogue; AdminOnly owner-scoped legacy simulation retained');}
|
||||
assert.deepEqual(errors,[]);assert.equal(external.length,0);await context.close();}}finally{await b.close();}})().catch(e=>{console.error(e.stack);process.exitCode=1});
|
||||
76
PlotLine.Tests/ProductionInvestigationTests.cs
Normal file
76
PlotLine.Tests/ProductionInvestigationTests.cs
Normal file
@ -0,0 +1,76 @@
|
||||
using System.Text.Json;
|
||||
using PlotLine.Models.Investigations;
|
||||
using PlotLine.Services.Investigations;
|
||||
internal static class ProductionInvestigationTests
|
||||
{
|
||||
public static Catalogue Load()=>CatalogueValidator.Parse(File.ReadAllText("Docs/Writer/Investigations/production-catalogue-v0.1.json"));
|
||||
static void Check(bool ok,string message){if(!ok)throw new Exception(message);}
|
||||
public static void Run(string? output=null)
|
||||
{
|
||||
var c=Load();var caps=c.Capabilities.Select(d=>d.Id).ToHashSet();
|
||||
var wording=JsonDocument.Parse(File.ReadAllText("Docs/Writer/Investigations/Production-Editorial-Source-v0.1.json"));
|
||||
foreach(var expected in wording.RootElement.EnumerateArray()){
|
||||
var q=c.Questions.Single(q=>q.Id==expected.GetProperty("Id").GetString());Check(q.Text==expected.GetProperty("Text").GetString(),"exact editorial question "+q.Id);
|
||||
foreach(var o in expected.GetProperty("Options").EnumerateArray())Check(q.Options.Single(a=>a.Id==o.GetProperty("Id").GetString()).Text==o.GetProperty("Text").GetString(),"exact editorial answer "+q.Id);
|
||||
}
|
||||
Check(c.Questions.Count==19&&c.Questions.Sum(q=>q.Options.Count)==88&&!c.Synthetic,"production identity/counts");
|
||||
var paths=new List<object>();var reachable=new HashSet<string>();
|
||||
foreach(var concern in c.Concerns)foreach(var target in c.Hypotheses.Where(h=>h.Capabilities.Count>0).Select(h=>h.Id).Concat(["healthy","uncertain","mixed","qualified"])){
|
||||
var answers=new List<Answer>();bool qualifiedSignal=false;var seen=new HashSet<string>();var steps=new List<object>();
|
||||
for(int n=0;n<=c.MaxAnswers;n++){
|
||||
var e=InvestigationEngine.Evaluate(c,concern.Id,answers,caps);steps.Add(new{answers=answers.ToArray(),evaluation=e});if(e.NextQuestion==null)break;
|
||||
Check(n<c.MaxAnswers&&seen.Add(e.NextQuestion),"bounded adaptive questions");var q=c.Questions.Single(q=>q.Id==e.NextQuestion);AnswerOption option;
|
||||
if(target=="qualified"){
|
||||
var goal=new Dictionary<string,string>{{"A","disconnected"},{"B","motivation"},{"C","slow"},{"D","conflict"},{"E","continuity"},{"F","motivation"}}[concern.Id];
|
||||
option=(qualifiedSignal?Enumerable.Empty<AnswerOption>():q.Options.Where(o=>o.Contributions.Any(v=>v.Hypothesis==goal&&v.Weight>0))).OrderBy(o=>Math.Abs(o.Contributions.Where(v=>v.Hypothesis==goal).Sum(v=>v.Weight)-2)).ThenBy(o=>o.Id).FirstOrDefault()??q.Options.FirstOrDefault(o=>o.Uncertain)??q.Options.First();
|
||||
if(q.Purpose!="Discrimination"&&option.Contributions.Any(v=>v.Hypothesis==goal&&v.Weight>0))qualifiedSignal=true;
|
||||
}
|
||||
else if(target=="healthy")option=q.Options.First().Contributions.All(v=>v.Weight<=0)?q.Options.First():q.Options.FirstOrDefault(o=>o.Uncertain)??q.Options.OrderBy(o=>o.Contributions.Sum(v=>Math.Max(0,v.Weight))).First();else if(target=="uncertain")option=q.Options.FirstOrDefault(o=>o.Uncertain)??q.Options.OrderBy(o=>o.Contributions.Sum(v=>Math.Max(0,v.Weight))).ThenBy(o=>o.Id).First();
|
||||
else if(target=="mixed")option=q.Options[n%q.Options.Count];
|
||||
else option=q.Options.OrderByDescending(o=>o.Contributions.Sum(v=>v.Hypothesis==target?v.Weight*20:-Math.Max(0,v.Weight))).ThenBy(o=>o.Id,StringComparer.Ordinal).First();
|
||||
answers.Add(new(q.Id,option.Id));
|
||||
}
|
||||
var final=InvestigationEngine.Evaluate(c,concern.Id,answers,caps);var result=EditorialConclusion.From(c,final);
|
||||
Check(final.NextQuestion==null&&result.Action.Length>20&&result.Title.Length>0,"useful completed result");
|
||||
Check(JsonSerializer.Serialize(final)==JsonSerializer.Serialize(InvestigationEngine.Evaluate(c,concern.Id,answers,caps)),"deterministic production replay");
|
||||
foreach(var id in final.Recommendations){Check(final.AnswerCount>=8&&final.Hypotheses.Single(h=>h.Id==id).Supported,"unchanged confidence requirements");reachable.Add(id);}
|
||||
if(target=="uncertain")Check(final.Recommendations.Count==0,"uncertainty not proof");
|
||||
paths.Add(new{concern=concern.Id,target,answers,final,result,steps});
|
||||
}
|
||||
var examples=new[]{
|
||||
("A","plot-agency",new Dictionary<string,string>{{"Q02","B"},{"Q03","B"},{"Q04","B"},{"Q11","B"},{"Q12","B"}},new[]{"agency","causality","disconnected"}),
|
||||
("B","character-development",new Dictionary<string,string>{{"Q05","C"},{"Q06","C"},{"Q07","C"},{"Q17","B"}},new[]{"motivation","development","relationships"}),
|
||||
("C","slow-middle",new Dictionary<string,string>{{"Q08","B"},{"Q09","B"},{"Q11","B"}},new[]{"slow","conflict"}),
|
||||
("D","weak-pressure",new Dictionary<string,string>{{"Q11","B"},{"Q12","B"},{"Q13","B"}},new[]{"conflict","stakes","emotion"}),
|
||||
("E","earlier-change",new Dictionary<string,string>{{"Q14","A"},{"Q15","B"},{"Q16","A"}},new[]{"continuity","chronology"}),
|
||||
("A","contrasting-accounts",new Dictionary<string,string>{{"Q02","A"},{"Q03","C"}},new[]{"disconnected","causality"}),
|
||||
("F","unclear-to-character",new Dictionary<string,string>{{"Q17","B"},{"Q18","B"},{"Q19","B"},{"Q05","C"}},new[]{"motivation","emotion"})};
|
||||
foreach(var (concern,name,choices,expected) in examples){
|
||||
var a=new List<Answer>();var steps=new List<object>();Evaluation e;
|
||||
while(true){e=InvestigationEngine.Evaluate(c,concern,a,caps);steps.Add(new{answers=a.ToArray(),evaluation=e});if(e.NextQuestion==null)break;Check(a.Count<12,"named example bound");var q=c.Questions.Single(q=>q.Id==e.NextQuestion);var o=choices.TryGetValue(q.Id,out var id)?q.Options.Single(o=>o.Id==id):q.Options.FirstOrDefault(o=>o.Uncertain)??q.Options.First();a.Add(new(q.Id,o.Id));}
|
||||
var result=EditorialConclusion.From(c,e);Check(result.Findings.Any(r=>expected.Contains(r.Hypothesis)),"specific cross-route editorial result "+name);
|
||||
paths.Add(new{concern,target=name,answers=a,final=e,result,steps});
|
||||
}
|
||||
foreach(var concern in c.Concerns){
|
||||
var routePaths=paths.Select(x=>JsonSerializer.SerializeToElement(x)).Where(x=>x.GetProperty("concern").GetString()==concern.Id).ToArray();
|
||||
Check(routePaths.Any(x=>x.GetProperty("final").GetProperty("Recommendations").GetArrayLength()>0),"supported opening route "+concern.Id);
|
||||
Check(routePaths.Any(x=>x.GetProperty("result").GetProperty("Kind").GetString() is "tentative" or "ambiguous"),"qualified opening route "+concern.Id);
|
||||
}
|
||||
Check(c.Hypotheses.Where(h=>!c.Editorial!.TentativeOnly.Contains(h.Id)).All(h=>reachable.Contains(h.Id)),"every confidence-eligible result demonstrated");
|
||||
var pref=InvestigationEngine.Evaluate(c,"F",[new("Q17","B"),new("Q18","B"),new("Q19","B")],caps).Hypotheses.Single(h=>h.Id=="motivation");Check(pref.Support==1&&pref.Dimensions==1&&pref.Groups==1&&!pref.Supported,"Q17–Q19 cannot manufacture corroboration");
|
||||
var revision=new Investigation{Concern="B",Presented=["Q05"],Answers=[new("Q05","C")]};InvestigationService.Answer(revision,c,"Q05","A",null);Check(InvestigationService.Evaluate(c,revision).Hypotheses.Single(h=>h.Id=="motivation").Support==0,"revision removes obsolete production evidence");
|
||||
var repo=new InvestigationMemoryRepository();repo.Publish(JsonSerializer.Serialize(c,CatalogueValidator.Json),"test").GetAwaiter().GetResult();Check(repo.Catalogue("synthetic-3d1-v1").Result!.Synthetic&&!repo.Catalogue(c.Version).Result!.Synthetic,"immutable production/synthetic coexistence");
|
||||
foreach(var change in new Action<Catalogue>[] {x=>x.Questions[1].Id=x.Questions[2].Id,x=>x.Questions[1].Options[0].Id="Z",x=>x.Editorial!.FollowUps["Q02.A"].Questions=["missing"],x=>x.Questions[1].Options[0].Contributions[0].Weight=4,x=>x.Editorial!.Results.RemoveAt(0),x=>x.Capabilities[0].Resolver="public",x=>x.Questions[0].Options[0].Contributions.Add(new(){Hypothesis="motivation",Dimension="routing",Weight=3})}){
|
||||
var invalid=Load();change(invalid);bool rejected=false;try{CatalogueValidator.Validate(invalid);}catch(ArgumentException){rejected=true;}Check(rejected,"invalid catalogue rejected");
|
||||
}
|
||||
var used=paths.Select(x=>JsonSerializer.SerializeToElement(x)).SelectMany(x=>x.GetProperty("result").GetProperty("Findings").EnumerateArray().Select(r=>r.GetProperty("Hypothesis").GetString()!)).ToHashSet();
|
||||
used.Add(c.Hypotheses.Single(h=>h.Capabilities.Count==0).Id);Check(c.Editorial!.Results.All(r=>used.Contains(r.Hypothesis)),"all authored result templates exercised");
|
||||
var strong=paths.Select(x=>JsonSerializer.SerializeToElement(x)).First(x=>x.GetProperty("final").GetProperty("Recommendations").GetArrayLength()>0);
|
||||
var strongAnswers=strong.GetProperty("answers").Deserialize<List<Answer>>(CatalogueValidator.Json)!;var on=InvestigationEngine.Evaluate(c,strong.GetProperty("concern").GetString()!,strongAnswers,caps);var off=InvestigationEngine.Evaluate(c,strong.GetProperty("concern").GetString()!,strongAnswers,new HashSet<string>());
|
||||
Check(off.Recommendations.Count==0&&EditorialConclusion.From(c,off).Kind=="unavailable"&&on.Hypotheses.Select(h=>(h.Id,h.Support,h.Opposition,h.Score,h.Supported)).SequenceEqual(off.Hypotheses.Select(h=>(h.Id,h.Support,h.Opposition,h.Score,h.Supported))),"availability remains independent of diagnosis");
|
||||
var oneDisabled=InvestigationEngine.Evaluate(c,strong.GetProperty("concern").GetString()!,strongAnswers,caps.Where(id=>id!="timeline").ToHashSet());Check(!InvestigationService.CanOpen(c,oneDisabled,"timeline")&&InvestigationService.CanOpen(c,oneDisabled,"threads"),"disabled adapter cannot be opened through an otherwise eligible multi-tool hypothesis");
|
||||
var saved=new Investigation{ID=Guid.NewGuid(),UserID=4,ProjectID=7,BookID=12,CatalogueVersion=c.Version,Concern=strong.GetProperty("concern").GetString()!,Answers=strongAnswers,Presented=strongAnswers.Select(a=>a.Question).ToList()};repo.Save(saved,0,"save",on).GetAwaiter().GetResult();var resumed=repo.Read(4,12,saved.ID).Result!;Check(JsonSerializer.Serialize(InvestigationService.Evaluate(c,resumed))==JsonSerializer.Serialize(on)&&repo.Read(5,12,saved.ID).Result==null&&repo.Read(4,13,saved.ID).Result==null,"production private save/resume and scope isolation");
|
||||
if(output!=null)File.WriteAllText(output,JsonSerializer.Serialize(new{catalogue=c.Version,reachable,paths},CatalogueValidator.Json));
|
||||
Console.WriteLine($"PASS production investigation catalogue: {paths.Count} deterministic completed paths; reachable={string.Join(',',reachable)}");
|
||||
}
|
||||
}
|
||||
@ -15,6 +15,7 @@ using PlotLine.Models;
|
||||
using PlotLine.Services;
|
||||
using PlotLine.ViewModels;
|
||||
|
||||
if(args.Contains("--production-investigation")){ProductionInvestigationTests.Run(args.Last());return;}
|
||||
if(args.Contains("--writer-investigation-diagnostics")){if(args.Contains("--acceptance"))InvestigationDiagnosticTests.Run();InvestigationDiagnosticTests.Export(args[^2],args[^1]);return;}
|
||||
if(args.Contains("--writer-investigation-sim")){InvestigationTests.Run();var output=args.SkipWhile(x=>x!="--writer-investigation-sim").Skip(1).FirstOrDefault();var report=InvestigationTests.Simulate(output);Console.WriteLine($"PASS investigation simulation: {report.Paths} paths, {report.Steps} answers; all hypotheses and destinations reachable; no loops/repeats/premature/invalid/non-deterministic outcomes.");return;}
|
||||
if(args.Contains("--map-topology-database")){await MapGeographicHierarchyDatabaseTests.Run(args.Last(),true);return;}
|
||||
@ -174,6 +175,7 @@ var tests = new (string Name, Action Test)[]
|
||||
("Native installation renewal and revocation remain account/security scoped", () => NativeInstallationTests.Run().GetAwaiter().GetResult()),
|
||||
("Guided investigation evidence, validation, revision and deterministic simulation",()=>InvestigationTests.Run()),
|
||||
("Guided investigation diagnostic corrective acceptance",()=>InvestigationDiagnosticTests.Run()),
|
||||
("Production Guided Investigation editorial acceptance",()=>ProductionInvestigationTests.Run()),
|
||||
("Review accepted anchors, immutable provenance and author decisions",()=>WriterReviewTests.Run()),
|
||||
("Writer Word verified navigation and acknowledgement",()=>WriterWordTests.Run().GetAwaiter().GetResult()),
|
||||
("Writer inline authoring validation",()=>WriterAuthoringTests.Run()),
|
||||
|
||||
@ -10,20 +10,28 @@ namespace PlotLine.Controllers;
|
||||
[ResponseCache(NoStore=true,Location=ResponseCacheLocation.None)]
|
||||
public sealed class WriterInvestigationsController(InvestigationAccess gate,IInvestigationRepository repository,InvestigationService service):Controller
|
||||
{
|
||||
async Task<bool> IsAdmin()=> (await HttpContext.RequestServices.GetRequiredService<IAuthorizationService>().AuthorizeAsync(User,null,"AdminOnly")).Succeeded;
|
||||
async Task EnsureCatalogue(Catalogue c){if(c.Synthetic&&!await IsAdmin())throw new UnauthorizedAccessException();}
|
||||
int Author=>int.Parse(User.FindFirstValue(ClaimTypes.NameIdentifier)!);
|
||||
async Task<IActionResult> Guard(Func<Task<IActionResult>> run){if(!gate.Enabled)return NotFound();Response.Headers["X-Robots-Tag"]="noindex, nofollow, noarchive";try{return await run();}catch(Exception e)when(e is UnauthorizedAccessException or KeyNotFoundException){return NotFound();}catch(Microsoft.Data.SqlClient.SqlException e)when(e.Number==51000){return NotFound();}catch(Microsoft.Data.SqlClient.SqlException e)when(e.Number==51002){Response.StatusCode=409;ViewData["Failure"]=e.Message;return View("Failure");}catch(ArgumentException e){Response.StatusCode=400;ViewData["Failure"]=e.Message;return View("Failure");}catch(Exception e)when(e is Microsoft.Data.SqlClient.SqlException or TimeoutException){Response.StatusCode=503;ViewData["Failure"]="Investigations are temporarily unavailable. No unconfirmed save should be assumed successful. Return to Explore to resume.";return View("Failure");}}
|
||||
[HttpGet("/Writer/Explore/Investigate")]
|
||||
public Task<IActionResult> Index(int bookId,Guid? id,string? question=null)=>Guard(async()=>{
|
||||
public Task<IActionResult> Index(int bookId,Guid? id,string? question=null,string? catalogueVersion=null)=>Guard(async()=>{
|
||||
var project=await service.Project(bookId);Catalogue c;Investigation? row=null;Evaluation? state=null;
|
||||
if(id.HasValue){(row,c)=await service.Read(Author,bookId,id.Value);state=service.Current(c,row);if(question!=null&&!row.Presented.Contains(question))return BadRequest();ViewData["Question"]=question??state.NextQuestion;}
|
||||
else c=await repository.Catalogue()??throw new ArgumentException("The test catalogue is not available yet.");
|
||||
return View(new InvestigationPage(row,c,state,await repository.List(Author,bookId),project,bookId));
|
||||
if(id.HasValue){(row,c)=await service.Read(Author,bookId,id.Value);await EnsureCatalogue(c);state=service.Current(c,row);if(question!=null&&!row.Presented.Contains(question))return BadRequest();ViewData["Question"]=question??state.NextQuestion;}
|
||||
else {if(catalogueVersion!=null&&!await IsAdmin())return NotFound();c=await (catalogueVersion==null?service.AuthorCatalogue():repository.Catalogue(catalogueVersion))??throw new ArgumentException("The investigation catalogue is not available yet.");await EnsureCatalogue(c);}
|
||||
var savedRows=await repository.List(Author,bookId);var saved=new List<Investigation>();var labels=new Dictionary<Guid,string>();var catalogues=new Dictionary<string,Catalogue>{{c.Version,c}};var admin=await IsAdmin();
|
||||
foreach(var item in savedRows){
|
||||
if(!catalogues.TryGetValue(item.CatalogueVersion,out var old)){old=await repository.Catalogue(item.CatalogueVersion);if(old==null)continue;catalogues[old.Version]=old;}
|
||||
if(!old.Synthetic||admin){saved.Add(item);labels[item.ID]=old.Concerns.Single(r=>r.Id==item.Concern).Text;}
|
||||
}
|
||||
ViewData["SavedConcernLabels"]=labels;
|
||||
return View(new InvestigationPage(row,c,state,saved,project,bookId));
|
||||
});
|
||||
[HttpPost("/Writer/Explore/Investigate/Start"),ValidateAntiForgeryToken]
|
||||
public Task<IActionResult> Start(int bookId,string concern)=>Guard(async()=>{var row=await service.Start(Author,bookId,concern);return RedirectToAction(nameof(Index),new{bookId,id=row.ID});});
|
||||
public Task<IActionResult> Start(int bookId,string concern,string? catalogueVersion=null)=>Guard(async()=>{if(catalogueVersion!=null&&!await IsAdmin())return NotFound();var c=await (catalogueVersion==null?service.AuthorCatalogue():repository.Catalogue(catalogueVersion))??throw new ArgumentException("The investigation catalogue is unavailable.");await EnsureCatalogue(c);var row=await service.Start(Author,bookId,concern,c.Version);return RedirectToAction(nameof(Index),new{bookId,id=row.ID});});
|
||||
[HttpPost("/Writer/Explore/Investigate/Answer"),ValidateAntiForgeryToken]
|
||||
public Task<IActionResult> Answer(int bookId,Guid id,int version,string? question,string? option,string? explanation,string operation="answer")=>Guard(async()=>{
|
||||
ViewData["Explanation"]=explanation;ViewData["Option"]=option;var(i,c)=await service.Read(Author,bookId,id);if(version!=i.Version){Response.StatusCode=409;ViewData["Failure"]="Another window changed this investigation. Your answer is retained below. Resume the latest version before submitting again.";ViewData["Explanation"]=explanation;ViewData["Option"]=option;return View("Failure");}
|
||||
ViewData["Explanation"]=explanation;ViewData["Option"]=option;var(i,c)=await service.Read(Author,bookId,id);await EnsureCatalogue(c);if(version!=i.Version){Response.StatusCode=409;ViewData["Failure"]="Another window changed this investigation. Your answer is retained below. Resume the latest version before submitting again.";ViewData["Explanation"]=explanation;ViewData["Option"]=option;return View("Failure");}
|
||||
if((operation is "answer" or "save")&&option!=null){InvestigationService.Answer(i,c,question??"",option??"",explanation);}
|
||||
else if(operation is "further" or "disagree"){i.Accepted=false;i.ContinueUntil=Math.Min(c.MaxAnswers,i.Answers.Count+2);}
|
||||
else if(operation=="accept")i.Accepted=true;
|
||||
@ -34,8 +42,8 @@ public sealed class WriterInvestigationsController(InvestigationAccess gate,IInv
|
||||
});
|
||||
[HttpPost("/Writer/Explore/Investigate/Open"),ValidateAntiForgeryToken]
|
||||
public Task<IActionResult> Open(int bookId,Guid id,int version,string capability)=>Guard(async()=>{
|
||||
var(i,c)=await service.Read(Author,bookId,id);if(version!=i.Version)throw new ArgumentException("Resume the latest version before opening a tool.");var result=service.Current(c,i);var d=c.Capabilities.SingleOrDefault(d=>d.Id==capability);
|
||||
if(d==null||!result.Recommendations.Any(h=>c.Hypotheses.Single(x=>x.Id==h).Capabilities.Contains(capability)))throw new ArgumentException("This destination is not currently recommended.");
|
||||
var(i,c)=await service.Read(Author,bookId,id);await EnsureCatalogue(c);if(version!=i.Version)throw new ArgumentException("Resume the latest version before opening a tool.");var result=service.Current(c,i);var d=c.Capabilities.SingleOrDefault(d=>d.Id==capability);
|
||||
if(d==null||!InvestigationService.CanOpen(c,result,capability))throw new ArgumentException("This destination is not currently recommended.");
|
||||
var target=DestinationRegistry.Resolve(d,i.ProjectID,i.BookID,true,i.Answers.ToDictionary(a=>a.Question));if(target==null)throw new ArgumentException("This tool is unavailable. Your investigation is retained.");
|
||||
i.SelectedDestination=capability;await service.Persist(i,c,version,"open-destination");TempData["InvestigationReturn"] = Url.Action(nameof(Index),new{bookId,id});
|
||||
return RedirectToAction(target.Value.Action,target.Value.Controller,target.Value.Values);
|
||||
|
||||
@ -4,8 +4,8 @@ category: Workspace
|
||||
tags: explore, investigation, questions, story
|
||||
contextKey: writer3.investigations
|
||||
micro: Work through a concern one question at a time; your answers stay with this book.
|
||||
quickTitle: Guided Investigation development preview
|
||||
quickSummary: Choose a concern, answer in your own time and revisit any earlier answer. Save for later preserves your investigation. This development preview uses a small synthetic catalogue, without AI or manuscript analysis.
|
||||
quickTitle: Work through a story concern
|
||||
quickSummary: Choose a concern, answer in your own time and revisit any earlier answer. Save for later preserves your investigation. Suggestions use your questionnaire answers, without AI or manuscript analysis.
|
||||
screenshot:
|
||||
---
|
||||
|
||||
@ -21,14 +21,14 @@ You can keep multiple investigations. Starting another does not overwrite the pr
|
||||
|
||||
# Consider the next step
|
||||
|
||||
Suggestions explain which questionnaire answers informed them and what remains uncertain. They do not claim to analyse the manuscript. You can agree, disagree or investigate further when questions remain. Sometimes there is not enough evidence or an appropriate tool is unavailable; the preview will say so.
|
||||
Suggestions explain which questionnaire answers informed them and what remains uncertain. They do not claim to analyse the manuscript. You can agree, disagree or investigate further when questions remain. Sometimes there is not enough evidence or an appropriate tool is unavailable; the investigation will say so.
|
||||
|
||||
A tentative possibility is different from a supported next step: it may identify an area to think about, but does not offer a tool as confidently recommended. If answers point in different directions, you can revisit them; they may describe different moments or reflect a change in understanding. If no clear direction emerges, you can save your work or return to Explore. The test has a question limit, so further questions are not always offered.
|
||||
A tentative possibility is different from a supported next step: it may identify an area to think about, but does not offer a tool as confidently recommended. If answers point in different directions, you can revisit them; they may describe different moments or reflect a change in understanding. If no clear direction emerges, you can save your work or return to Explore. Each investigation has a question limit, so further questions are not always offered.
|
||||
|
||||
New investigations use the latest preview catalogue. Existing investigations keep their original questions and evaluation rules; starting another leaves the earlier one intact.
|
||||
Starting another investigation leaves earlier author investigations intact. Each keeps the questions and evaluation rules with which it began.
|
||||
|
||||
Opening a recommended tool uses your authorised project and book in another tab. Your investigation remains open, ready to return to. It does not change your working objective, Word position, manuscript, scene status or session. After opening a tool, reload this investigation before another action if its version has changed.
|
||||
|
||||
# Development content only
|
||||
# Your answers guide the exploration
|
||||
|
||||
This synthetic catalogue exercises the mechanism, not production-quality writing advice. It is available only in Development. Production question wording, taxonomy and recommendations will be authored and qualified separately. No AI or external inference service is used.
|
||||
The opening concern guides the first questions; later answers can point to another area. Questions about an uncertain concern may overlap, so repeating a preference does not make a finding more certain. Every conclusion includes a practical writing action, even when no tool can be recommended confidently. No AI or external inference service is used. This first version is being qualified on Development.
|
||||
|
||||
@ -4,6 +4,8 @@ public sealed class Catalogue
|
||||
{
|
||||
[System.Text.Json.Serialization.JsonIgnore(Condition=System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingDefault)]
|
||||
public int EngineVersion {get;set;}
|
||||
[System.Text.Json.Serialization.JsonIgnore(Condition=System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull)]
|
||||
public EditorialCatalogue? Editorial {get;set;}
|
||||
public int SchemaVersion {get;set;}=1;
|
||||
public string Version {get;set;}="";
|
||||
public bool Synthetic {get;set;}=true;
|
||||
@ -82,3 +84,24 @@ public sealed record InvestigationPage(Investigation? Investigation,Catalogue Ca
|
||||
// The existing application ribbon reads the destination from page models.
|
||||
public string Destination => "Explore";
|
||||
}
|
||||
|
||||
// Authored diagnostic relevance only; not a capability dependency/readiness graph.
|
||||
public sealed class EditorialCatalogue
|
||||
{
|
||||
public string Version {get;set;}="";public string OpeningQuestion {get;set;}="";
|
||||
public Dictionary<string,string[]> Routes {get;set;}=[];
|
||||
public Dictionary<string,EditorialFollowUp> FollowUps {get;set;}=[];
|
||||
public Dictionary<string,string[]> Challenges {get;set;}=[];
|
||||
public List<string> TentativeOnly {get;set;}=[];
|
||||
public List<EditorialResult> Results {get;set;}=[];
|
||||
public Dictionary<string,EditorialState> States {get;set;}=[];
|
||||
}
|
||||
public sealed class EditorialFollowUp {public string[] Questions {get;set;}=[];public string Limitation {get;set;}="";}
|
||||
public sealed class EditorialResult
|
||||
{
|
||||
public string[] States {get;set;}=[];
|
||||
public string Hypothesis {get;set;}="";public string Title {get;set;}="";
|
||||
public string Explanation {get;set;}="";public string Action {get;set;}="";public string Qualification {get;set;}="";
|
||||
}
|
||||
|
||||
public sealed class EditorialState {public string Title {get;set;}="";public string Explanation {get;set;}="";public string Action {get;set;}="";public string Qualification {get;set;}="";}
|
||||
|
||||
@ -10,6 +10,7 @@ public static class CatalogueValidator
|
||||
{
|
||||
void Require(bool ok,string message){if(!ok)throw new ArgumentException(message);}
|
||||
void Ids(IEnumerable<string> ids,string label){var a=ids.ToArray();Require(a.Length>0&&a.Length<=2000&&a.All(x=>x!=null&&Regex.IsMatch(x,"^[a-zA-Z0-9][a-zA-Z0-9._-]{0,79}$"))&&a.Distinct(StringComparer.Ordinal).Count()==a.Length,"Invalid/duplicate "+label+" identifiers.");}
|
||||
if(c.EngineVersion==3){EditorialCatalogueValidator.Validate(c);return;}
|
||||
Require(c.EngineVersion is 0 or 2,"Unsupported investigation engine version.");
|
||||
Require(c.SchemaVersion==1&&c.Synthetic,"Only schema1 synthetic catalogues are supported in this phase.");Ids([c.Version],"version");Ids(c.Dimensions,"dimension");Ids(c.Concerns.Select(x=>x.Id),"concern");Ids(c.Hypotheses.Select(x=>x.Id),"hypothesis");Ids(c.Questions.Select(x=>x.Id),"question");Ids(c.Capabilities.Select(x=>x.Id),"capability");
|
||||
Require(c.MinAnswers>=2&&c.MaxAnswers>=c.MinAnswers&&c.MaxAnswers<=40,"Invalid question bounds.");
|
||||
|
||||
@ -3,11 +3,11 @@ namespace PlotLine.Services.Investigations;
|
||||
// Trusted authenticated adapters only. Catalogue data never supplies a URL or a controller name.
|
||||
public static class DestinationRegistry
|
||||
{
|
||||
public static readonly HashSet<string> Resolvers=["Write","Characters","PlotThreads","Timeline","Relationships"];
|
||||
public static readonly HashSet<string> Resolvers=["Write","Characters","PlotThreads","Timeline","Relationships","Review"];
|
||||
public static (string Controller,string Action,object Values)? Resolve(Capability d,int project,int book,bool authorised,IReadOnlyDictionary<string,Answer> answers)
|
||||
{
|
||||
if(!authorised||!d.Available||project<=0||d.RequiresBook&&book<=0||!InvestigationEngine.Allows(d.Prerequisites,answers))return null;
|
||||
var controller=d.Resolver switch{"Write"=>"Writer","Characters"=>"Characters","PlotThreads"=>"PlotLineWorkspace","Timeline"=>"Timeline","Relationships"=>"RelationshipMap",_=>null};
|
||||
return controller==null?null:(controller,controller=="Writer"?"Write":"Index",new{projectId=project,bookId=book});
|
||||
var controller=d.Resolver switch{"Write"=>"Writer","Characters"=>"Characters","PlotThreads"=>"PlotLineWorkspace","Timeline"=>"Timeline","Relationships"=>"RelationshipMap","Review"=>"Writer",_=>null};
|
||||
return controller==null?null:(controller,controller=="Writer"?(d.Resolver=="Review"?"Review":"Write"):"Index",new{projectId=project,bookId=book});
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,46 @@
|
||||
using PlotLine.Models.Investigations;
|
||||
namespace PlotLine.Services.Investigations;
|
||||
|
||||
public static class EditorialCatalogueValidator
|
||||
{
|
||||
public static void Validate(Catalogue c)
|
||||
{
|
||||
void Check(bool ok,string message){if(!ok)throw new ArgumentException(message);}
|
||||
bool Text(string s)=>!string.IsNullOrWhiteSpace(s)&&s.Length<=4000;
|
||||
void Unique(IEnumerable<string> ids){var a=ids.ToArray();Check(a.Length>0&&a.All(Text)&&a.All(id=>System.Text.RegularExpressions.Regex.IsMatch(id,"^[a-zA-Z0-9][a-zA-Z0-9._-]{0,79}$"))&&a.Distinct().Count()==a.Length,"Invalid or duplicate stable identifiers.");}
|
||||
Check(c.SchemaVersion==2&&!c.Synthetic&&c.EngineVersion==3&&c.Editorial!=null,"Production catalogue requires schema2 editorial metadata.");
|
||||
Unique([c.Version]);Unique(c.Dimensions);Unique(c.Questions.Select(q=>q.Id));Unique(c.Hypotheses.Select(h=>h.Id));Unique(c.Capabilities.Select(d=>d.Id));Unique(c.Concerns.Select(r=>r.Id));
|
||||
Check(c.MinAnswers==8&&c.MaxAnswers==12,"Qualified confidence bounds must remain 8–12.");
|
||||
var ed=c.Editorial!;Unique([ed.Version]);var qs=c.Questions.ToDictionary(q=>q.Id);var hs=c.Hypotheses.ToDictionary(h=>h.Id);var caps=c.Capabilities.Select(d=>d.Id).ToHashSet();
|
||||
Check(qs.Count==19&&Enumerable.Range(1,19).All(n=>qs.ContainsKey($"Q{n:00}")),"Expected exact Q01–Q19 question identifiers.");
|
||||
Check(ed.OpeningQuestion=="Q01"&&qs[ed.OpeningQuestion].Options.All(o=>o.Contributions.Count==0),"Opening concern is routing only.");
|
||||
void RuleCheck(Rule r){Check(r.MinAnswers>=0&&r.MinAnswers<=12&&r.AllAnswers.All(p=>qs.ContainsKey(p.Key)&&p.Value.Length>0&&p.Value.All(o=>qs[p.Key].Options.Any(a=>a.Id==o)))&&r.ExcludeAnswered.All(qs.ContainsKey)&&!r.AllAnswers.Keys.Intersect(r.ExcludeAnswered).Any(),"Invalid answer prerequisites.");}
|
||||
foreach(var q in c.Questions){
|
||||
Check(Text(q.Text)&&Text(q.Group)&&q.Hypotheses.Count>0&&q.Hypotheses.All(hs.ContainsKey)&&q.Dimensions.Count>0&&q.Dimensions.All(c.Dimensions.Contains)&&q.InformationValue is >=0 and <=20&&!q.Retired&&q.ReplacedBy==null,"Invalid production question.");
|
||||
Check(new[]{"ActionPreference","Discovery","Discrimination","Challenge","Corroboration"}.Contains(q.Purpose),"Invalid question purpose.");RuleCheck(q.Eligibility);Check(!q.Eligibility.AllAnswers.ContainsKey(q.Id)&&!q.Eligibility.ExcludeAnswered.Contains(q.Id),"Self prerequisite.");
|
||||
Unique(q.Options.Select(o=>o.Id));Check(q.Options.Count is >=4 and <=6&&q.Options.Select(o=>o.Id).SequenceEqual(Enumerable.Range(0,q.Options.Count).Select(n=>((char)('A'+n)).ToString())),"Expected stable A–F answer IDs.");
|
||||
foreach(var o in q.Options){Check(Text(o.Text)&&(!o.Uncertain||o.Contributions.Count==0)&&o.Interpretation=="","Uncertain answers cannot create confidence.");
|
||||
Check(o.Contributions.All(v=>q.Hypotheses.Contains(v.Hypothesis)&&q.Dimensions.Contains(v.Dimension)&&hs[v.Hypothesis].Dimensions.Contains(v.Dimension)&&v.Weight is >=-3 and <=3&&Text(v.Aspect)),"Invalid evidence mapping.");
|
||||
Check(o.Contributions.Select(v=>(v.Hypothesis,v.Dimension,v.Aspect)).Distinct().Count()==o.Contributions.Count,"Duplicate evidence.");
|
||||
Check(ed.FollowUps.TryGetValue(q.Id+"."+o.Id,out var next)&&Text(next.Limitation)&&next.Questions.All(id=>qs.ContainsKey(id)&&id!=q.Id&&id!=ed.OpeningQuestion),"Invalid or missing follow-up interpretation.");
|
||||
}
|
||||
}
|
||||
Check(ed.FollowUps.Count==c.Questions.Sum(q=>q.Options.Count),"Orphaned answer interpretation.");
|
||||
Check(ed.Routes.Count==c.Concerns.Count&&c.Concerns.All(r=>Text(r.Text)&&ed.Routes.TryGetValue(r.Id,out var ids)&&ids.Length>0&&ids.All(id=>qs.ContainsKey(id)&&id!=ed.OpeningQuestion)&&r.Priors.Count>0&&r.Priors.All(p=>hs.ContainsKey(p.Key)&&p.Value is >=0 and <=2)&&qs[ed.OpeningQuestion].Options.Any(o=>o.Id==r.Id&&o.Text==r.Text)),"Invalid opening route.");
|
||||
Check(ed.TentativeOnly.Distinct().Count()==ed.TentativeOnly.Count&&ed.TentativeOnly.All(hs.ContainsKey)&&ed.Challenges.Keys.ToHashSet().SetEquals(hs.Keys),"Invalid conclusion/challenge references.");
|
||||
Check(c.Hypotheses.Count(h=>h.Capabilities.Count==0)==1,"Exactly one non-diagnostic fallback is required.");
|
||||
foreach(var h in c.Hypotheses){Check(Text(h.Description)&&Text(h.Summary)&&Text(h.Reason)&&Text(h.Uncertainty)&&h.Dimensions.Count>0&&h.Dimensions.All(c.Dimensions.Contains)&&h.Capabilities.All(caps.Contains),"Invalid hypothesis/destination.");RuleCheck(h.Eligibility);
|
||||
Check(h.MinDimensions==2&&h.MinGroups==2&&h.Threshold==4,"Confidence requirements must not be weakened.");
|
||||
var supporting=c.Questions.Where(q=>q.Options.Any(o=>o.Contributions.Any(v=>v.Hypothesis==h.Id&&v.Weight>0))).ToArray();
|
||||
Check(ed.Challenges[h.Id].All(id=>qs.TryGetValue(id,out var q)&&q.Options.Any(o=>!o.Uncertain&&o.Contributions.Any(v=>v.Hypothesis==h.Id&&v.Weight<0))),"Challenge lacks a real disconfirming answer.");
|
||||
if(!ed.TentativeOnly.Contains(h.Id))Check(h.Capabilities.Count>0&&supporting.SelectMany(q=>q.Options.SelectMany(o=>o.Contributions)).Where(v=>v.Hypothesis==h.Id&&v.Weight>0).Select(v=>v.Dimension).Distinct().Count()>=2&&supporting.Select(q=>q.Group).Distinct().Count()>=2&&ed.Challenges[h.Id].Length>0,"Insufficient independent evidence for a recommendable result.");
|
||||
}
|
||||
Check(ed.States.Keys.ToHashSet().SetEquals(new[]{"supported","unavailable","conflicting","ambiguous","tentative","healthy","uncertain"})&&ed.States.Values.All(s=>Text(s.Title)&&Text(s.Explanation)&&Text(s.Action)&&Text(s.Qualification)),"Missing or invalid conclusion-state templates.");
|
||||
Check(ed.Results.Count==hs.Count&&ed.Results.Select(r=>r.Hypothesis).ToHashSet().SetEquals(hs.Keys)&&ed.Results.All(r=>r.States.Length>0&&r.States.All(ed.States.ContainsKey)&&Text(r.Title)&&Text(r.Explanation)&&Text(r.Action)&&Text(r.Qualification)),"Missing, duplicate or orphaned result templates.");
|
||||
foreach(var r in ed.Results){var required=hs[r.Hypothesis].Capabilities.Count==0?new[]{"healthy","uncertain"}:ed.TentativeOnly.Contains(r.Hypothesis)?new[]{"tentative","ambiguous","conflicting"}:new[]{"supported","unavailable","tentative","ambiguous","conflicting"};Check(r.States.ToHashSet().SetEquals(required),"Result template states conflict with evidence eligibility.");}
|
||||
foreach(var d in c.Capabilities){Check(Text(d.Name)&&Text(d.Description)&&Text(d.ActionText)&&DestinationRegistry.Resolvers.Contains(d.Resolver)&&d.Authority=="ProjectAccess"&&d.RequiresProject&&d.RequiresBook&&d.Context is "book" or "project"&&hs.Values.Any(h=>h.Capabilities.Contains(d.Id)),"Invalid authenticated capability.");RuleCheck(d.Prerequisites);}
|
||||
var reach=ed.Routes.Values.SelectMany(x=>x).ToHashSet();bool changed;do{changed=false;foreach(var id in reach.ToArray())foreach(var o in qs[id].Options)foreach(var next in ed.FollowUps[id+"."+o.Id].Questions)if(reach.Add(next))changed=true;}while(changed);
|
||||
Check(c.Questions.All(q=>q.Id==ed.OpeningQuestion||reach.Contains(q.Id)),"Orphaned/unreachable question.");
|
||||
var probes=c.Questions.Where(q=>q.Purpose=="Discrimination").ToArray();Check(probes.Length==3&&probes.Select(q=>q.Group).Distinct().Count()==1&&probes.SelectMany(q=>q.Dimensions).Distinct().Count()==1,"Related preference probes must share independence.");
|
||||
}
|
||||
}
|
||||
20
PlotLine/Services/Investigations/EditorialConclusion.cs
Normal file
20
PlotLine/Services/Investigations/EditorialConclusion.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using PlotLine.Models.Investigations;
|
||||
namespace PlotLine.Services.Investigations;
|
||||
public sealed record EditorialConclusion(string Kind,string Title,string Explanation,string Qualification,IReadOnlyList<EditorialResult> Findings,string Action)
|
||||
{
|
||||
public static EditorialConclusion From(Catalogue c,Evaluation e)
|
||||
{
|
||||
var ed=c.Editorial!;
|
||||
var positive=e.Hypotheses.Where(h=>h.Support+h.Opposition>=2).ToArray();
|
||||
var supported=e.Hypotheses.Where(h=>h.Supported).ToArray();
|
||||
var conflicts=e.Hypotheses.Where(h=>h.Conflicts.Length>0).ToArray();
|
||||
var mixed=e.Hypotheses.Where(h=>h.Support>=2&&h.Opposition<=-2).ToArray();
|
||||
var kind=e.Recommendations.Count>0?"supported":supported.Any(h=>!h.Eligible)&&!supported.Any(h=>h.Eligible)?"unavailable":conflicts.Length>0?"conflicting":positive.Length>1&&positive[1].Score>=positive[0].Score-2?"ambiguous":positive.Length>0?"tentative":mixed.Length>0?"ambiguous":e.Evidence.Any(v=>v.Raw<=-2&&!v.Uncertain)?"healthy":"uncertain";
|
||||
var relevant=(kind=="supported"?e.Hypotheses.Where(h=>e.Recommendations.Contains(h.Id)):kind=="unavailable"?supported:kind=="conflicting"?conflicts:positive.Length>0?positive.AsEnumerable():mixed).Take(2).ToArray();
|
||||
var findings=relevant.Select(h=>ed.Results.Single(r=>r.Hypothesis==h.Id)).Where(r=>r.States.Contains(kind)).ToArray();
|
||||
var state=ed.States[kind];
|
||||
var title=(kind is "supported" or "tentative")&&findings.Length>0?findings[0].Title:state.Title;
|
||||
var action=findings.Length>0?findings[0].Action:kind=="healthy"?state.Action:ed.Results.Single(r=>c.Hypotheses.Single(h=>h.Id==r.Hypothesis).Capabilities.Count==0).Action;
|
||||
return new(kind,title,state.Explanation,state.Qualification,findings,action);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
using PlotLine.Models.Investigations;
|
||||
namespace PlotLine.Services.Investigations;
|
||||
|
||||
// An answer activates relevant candidates, never a fixed next-question pointer.
|
||||
public static class EditorialQuestionSelection
|
||||
{
|
||||
public static List<CandidateQuestion> Select(Catalogue c,string concern,Dictionary<string,Answer> answers,Evaluation e)
|
||||
{
|
||||
var editorial=c.Editorial!;var active=editorial.Routes[concern].ToHashSet();
|
||||
foreach(var a in answers.Values)active.UnionWith(editorial.FollowUps[a.Question+"."+a.Option].Questions);
|
||||
var leaders=e.Hypotheses.Where(h=>h.Support+h.Opposition>=2).Take(3).ToArray();
|
||||
foreach(var h in leaders)foreach(var q in c.Questions.Where(q=>q.Hypotheses.Contains(h.Id)))active.Add(q.Id);
|
||||
var covered=e.Evidence.Where(v=>!v.Uncertain&&v.Raw!=0).Select(v=>(v.Hypothesis,v.Dimension)).ToHashSet();
|
||||
var groups=e.Evidence.Where(v=>!v.Uncertain&&v.Raw>0).Select(v=>v.Group).ToHashSet();
|
||||
var candidates=new List<CandidateQuestion>();
|
||||
foreach(var q in c.Questions.Where(q=>q.Id!=editorial.OpeningQuestion&&!q.Retired&&!answers.ContainsKey(q.Id)&&active.Contains(q.Id)&&InvestigationEngine.Allows(q.Eligibility,answers)))
|
||||
{
|
||||
var effects=q.Options.Where(o=>!o.Uncertain).SelectMany(o=>o.Contributions).Where(v=>v.Weight!=0).ToArray();
|
||||
// Preference/symptom repetitions sharing one authored group cannot buy another question or corroboration.
|
||||
if(q.Purpose=="Discrimination"&&groups.Contains(q.Group))continue;
|
||||
var relevant=leaders.Count(h=>q.Hypotheses.Contains(h.Id));
|
||||
var gaps=effects.Select(v=>(v.Hypothesis,v.Dimension)).Distinct().Count(v=>!covered.Contains(v));
|
||||
var challenge=leaders.Count(h=>!h.Challenged&&editorial.Challenges.GetValueOrDefault(h.Id,[]).Contains(q.Id));
|
||||
var conflicts=leaders.Count(h=>h.Conflicts.Length>0&&q.Hypotheses.Contains(h.Id));
|
||||
var rank=q.InformationValue+relevant*5+Math.Min(4,gaps)+challenge*12+conflicts*3+(editorial.Routes[concern].Contains(q.Id)?6:0);
|
||||
candidates.Add(new(q.Id,rank,$"Authored relevance links; leading explanations {relevant}; new evidence dimensions {gaps}; challenge opportunities {challenge}; conflicting explanations {conflicts}; opening-route relevance {editorial.Routes[concern].Contains(q.Id)}."));
|
||||
}
|
||||
return candidates;
|
||||
}
|
||||
}
|
||||
@ -11,7 +11,7 @@ public static class InvestigationDiagnostics
|
||||
var current = answers.GroupBy(a => a.Question).ToDictionary(g => g.Key, g => g.Last());
|
||||
var stop = e.NextQuestion != null ? "continue" : e.Recommendations.Count > 0 ? "supported-evidence" : e.Hypotheses.Any(h=>h.Supported)&&!e.Hypotheses.Any(h=>h.Supported&&h.Eligible) ? "capability-unavailable" : answers.Count >= c.MaxAnswers ? "maximum-questions" : e.Candidates.Count == 0 ? "no-useful-questions" : "completion";
|
||||
return new {
|
||||
catalogue = c.Version, engineVersion=c.EngineVersion, minimumAnswers=c.MinAnswers,maximumAnswers=c.MaxAnswers,continueUntil, concern, activated = c.Concerns.Single(x=>x.Id==concern).Priors, answers = answers.ToArray(),
|
||||
editorialSemantics = c.Editorial, catalogue = c.Version, engineVersion=c.EngineVersion, minimumAnswers=c.MinAnswers,maximumAnswers=c.MaxAnswers,continueUntil, concern, activated = c.Concerns.Single(x=>x.Id==concern).Priors, answers = answers.ToArray(),
|
||||
evaluation = e, stoppingCondition = stop,
|
||||
conclusionReasons = new {
|
||||
insufficientEvidence=e.Hypotheses.All(h=>!h.Supported),
|
||||
|
||||
@ -23,10 +23,11 @@ public static class InvestigationEngine
|
||||
var conflicts=rows.GroupBy(e=>(e.Dimension,e.Aspect)).Where(g=>g.Any(e=>e.Raw>=2)&&g.Any(e=>e.Raw<=-2)).Where(g=>!answers.Values.Any(a=>{var q=c.Questions.Single(x=>x.Id==a.Question);var o=q.Options.Single(x=>x.Id==a.Option);return q.Clarifies.Contains(g.Key.Dimension)&&q.Hypotheses.Contains(h.Id)&&o.Interpretation == "different-aspects";})).Select(g=>$"{h.Id}/{g.Key.Dimension}/{g.Key.Aspect}").ToArray();
|
||||
var dimensions=independent.Where(x=>x.Positive>0).Select(x=>x.Dimension).Distinct().Count();
|
||||
var groups=rows.Where(e=>e.Raw>0).Select(e=>e.Group).Distinct().Count();
|
||||
var challenged=answers.Values.Any(a=>{var q=c.Questions.Single(x=>x.Id==a.Question);return q.Purpose=="Challenge"&&q.Hypotheses.Contains(h.Id)&&!q.Options.Single(o=>o.Id==a.Option).Uncertain;});
|
||||
var challenged=answers.Values.Any(a=>{var q=c.Questions.Single(x=>x.Id==a.Question);return (q.Purpose=="Challenge"&&q.Hypotheses.Contains(h.Id)||c.Editorial!=null&&c.Editorial.Challenges.GetValueOrDefault(h.Id,[]).Contains(q.Id))&&!q.Options.Single(o=>o.Id==a.Option).Uncertain;});
|
||||
var competitors=result.Evidence.Where(e=>e.Hypothesis!=h.Id&&!e.Uncertain&&e.Raw!=0).Select(e=>e.Hypothesis).Distinct().Count();
|
||||
var eligible=Allows(h.Eligibility,answers)&&h.Capabilities.Any(id=>available.Contains(id)&&c.Capabilities.Any(d=>d.Id==id&&d.Available&&Allows(d.Prerequisites,answers)));
|
||||
var missing=new List<string>();if(dimensions<h.MinDimensions)missing.Add("distinct dimensions");if(groups<h.MinGroups)missing.Add("independent corroboration");if(!challenged)missing.Add("challenge opportunity");if(competitors<1)missing.Add("competing explanation examined");if(conflicts.Length>0)missing.Add("material conflict clarified");if(support+opposition<h.Threshold)missing.Add("net evidence");
|
||||
if(c.Editorial?.TentativeOnly.Contains(h.Id)==true)missing.Add("catalogue provides tentative guidance only");
|
||||
result.Hypotheses.Add(new(h.Id,seed.Priors.GetValueOrDefault(h.Id),support,opposition,support+opposition+seed.Priors.GetValueOrDefault(h.Id),dimensions,groups,challenged,eligible,missing.Count==0,conflicts,missing.ToArray()));
|
||||
}
|
||||
result.Hypotheses=result.Hypotheses.OrderByDescending(h=>h.Score).ThenBy(h=>h.Id,StringComparer.Ordinal).ToList();
|
||||
@ -42,9 +43,10 @@ public static class InvestigationEngine
|
||||
result.Candidates.Add(new(q.Id,rank,$"Relevant leading explanations: {string.Join(", ",q.Hypotheses.Where(plausible.Contains))}; unexamined dimensions: {gaps}; unresolved conflicts: {conflicts}; challenge gaps: {challenge}; corroboration gaps: {corroboration}; authored information value: {q.InformationValue}."));
|
||||
}
|
||||
if(c.EngineVersion==2)result.Candidates=SelectQuestions(c,answers,result);
|
||||
if(c.EngineVersion==3)result.Candidates=EditorialQuestionSelection.Select(c,concern,answers,result);
|
||||
result.Candidates=result.Candidates.OrderByDescending(x=>x.Rank).ThenBy(x=>x.Id,StringComparer.Ordinal).ToList();
|
||||
var qualified=result.Hypotheses.Where(h=>h.Supported).ToArray();var ready=answers.Count>=Math.Max(c.MinAnswers,continueUntil);
|
||||
if(c.EngineVersion==2&&qualified.Length>0){
|
||||
if(c.EngineVersion>=2&&qualified.Length>0){
|
||||
var best=qualified.Max(h=>h.Score);
|
||||
// A close, positively supported rival deserves its missing challenge/clarification before choosing a tool.
|
||||
var unresolved=result.Hypotheses.Any(h=>!h.Supported&&h.Support+h.Opposition>=c.Hypotheses.Single(x=>x.Id==h.Id).Threshold-2&&result.Candidates.Any(candidate=>{var q=c.Questions.Single(x=>x.Id==candidate.Id);var possible=q.Options.Where(o=>!o.Uncertain).Select(o=>o.Contributions.Where(v=>v.Hypothesis==h.Id).Sum(v=>Math.Max(0,v.Weight))).DefaultIfEmpty().Max();return q.Hypotheses.Contains(h.Id)&&h.Score+possible>=best-2;}));
|
||||
@ -52,7 +54,7 @@ public static class InvestigationEngine
|
||||
}
|
||||
if(ready&&qualified.Length>0){var usable=qualified.Where(h=>h.Eligible).ToArray();if(usable.Length==0)result.Outcome="No suitable destination currently available";else{result.Recommendations=usable.Where(h=>h.Score>=usable[0].Score-2).Take(2).Select(h=>h.Id).ToList();result.Outcome=result.Recommendations.Count==2?"Two plausible explanations":"Supported recommendation";}}
|
||||
if(result.Outcome=="Investigating"&&(answers.Count>=c.MaxAnswers||result.Candidates.Count==0))result.Outcome=result.Hypotheses.Count(h=>h.Support>0)>=2?"Two plausible explanations":"More information needed";
|
||||
if(c.EngineVersion==2&&result.Outcome!="Investigating"&&result.Recommendations.Count==0&&result.Outcome!="No suitable destination currently available")
|
||||
if(c.EngineVersion>=2&&result.Outcome!="Investigating"&&result.Recommendations.Count==0&&result.Outcome!="No suitable destination currently available")
|
||||
result.Outcome=result.Hypotheses.Any(h=>h.Conflicts.Length>0)?"Conflicting evidence":result.Hypotheses.Count(h=>h.Support+h.Opposition>0)>=2?"Two plausible explanations":result.Hypotheses.Any(h=>h.Support+h.Opposition>0)?"Tentative conclusion":"More information needed";
|
||||
// Ambiguous terminal outcomes do not invent qualified recommendations.
|
||||
if(result.Outcome=="Investigating")result.NextQuestion=result.Candidates.FirstOrDefault()?.Id;
|
||||
|
||||
@ -9,10 +9,12 @@ public sealed class InvestigationService(IInvestigationRepository repository,IBo
|
||||
{
|
||||
public async Task<int> Project(int book){if(!await access.CanAccessEntityAsync("Book",book))throw new UnauthorizedAccessException();var b=await books.GetAsync(book);if(b==null||b.IsArchived)throw new UnauthorizedAccessException();return b.ProjectID;}
|
||||
public static HashSet<string> Available(Catalogue c,Investigation i)=>c.Capabilities.Where(d=>DestinationRegistry.Resolve(d,i.ProjectID,i.BookID,true,i.Answers.ToDictionary(a=>a.Question))!=null).Select(d=>d.Id).ToHashSet();
|
||||
public static bool CanOpen(Catalogue c,Evaluation state,string capability)=>state.AvailableCapabilities.Contains(capability)&&state.Recommendations.Any(id=>c.Hypotheses.Single(h=>h.Id==id).Capabilities.Contains(capability));
|
||||
public static Evaluation Evaluate(Catalogue c,Investigation i)=>InvestigationEngine.Evaluate(c,i.Concern,i.Answers,Available(c,i),i.ContinueUntil);
|
||||
public Evaluation Current(Catalogue c,Investigation i)=>InvestigationEngine.Evaluate(c,i.Concern,i.Answers,Available(c,i).Where(id=>configuration.GetValue($"WriterInvestigations:Capabilities:{id}:Enabled",true)).ToHashSet(),i.ContinueUntil);
|
||||
public async Task<(Investigation,Catalogue)> Read(int user,int book,Guid id){var project=await Project(book);var row=await repository.Read(user,book,id)??throw new KeyNotFoundException();if(row.UserID!=user||row.BookID!=book||row.ProjectID!=project)throw new UnauthorizedAccessException();return(row,await repository.Catalogue(row.CatalogueVersion)??throw new KeyNotFoundException());}
|
||||
public async Task<Investigation> Start(int user,int book,string concern){var project=await Project(book);var c=await repository.Catalogue()??throw new ArgumentException("The test catalogue is not yet available.");var i=new Investigation{ID=Guid.NewGuid(),UserID=user,ProjectID=project,BookID=book,CatalogueVersion=c.Version,Concern=concern,CreatedUtc=clock.GetUtcNow().UtcDateTime};await Persist(i,c,0,"start");return i;}
|
||||
public Task<Catalogue?> AuthorCatalogue()=>repository.Catalogue(configuration.GetValue("WriterInvestigations:AuthorCatalogue","guided-investigation-production-v0.1"));
|
||||
public async Task<Investigation> Start(int user,int book,string concern,string? catalogueVersion=null){var project=await Project(book);var c=await (catalogueVersion==null?AuthorCatalogue():repository.Catalogue(catalogueVersion))??throw new ArgumentException("The investigation catalogue is not yet available.");var i=new Investigation{ID=Guid.NewGuid(),UserID=user,ProjectID=project,BookID=book,CatalogueVersion=c.Version,Concern=concern,CreatedUtc=clock.GetUtcNow().UtcDateTime};await Persist(i,c,0,"start");return i;}
|
||||
public async Task Persist(Investigation i,Catalogue c,int expected,string operation)
|
||||
{
|
||||
var state=Current(c,i);i.CurrentQuestion=state.NextQuestion;
|
||||
|
||||
17
PlotLine/Sql/274_WriterEditorialCatalogues.sql
Normal file
17
PlotLine/Sql/274_WriterEditorialCatalogues.sql
Normal file
@ -0,0 +1,17 @@
|
||||
-- Forward-only: accept immutable editorial catalogues as well as legacy synthetic versions.
|
||||
-- No investigation/catalogue payload is rewritten. No Production activation or seed is performed here.
|
||||
SET ANSI_NULLS ON;
|
||||
SET QUOTED_IDENTIFIER ON;
|
||||
GO
|
||||
CREATE OR ALTER PROCEDURE dbo.WriterInvestigationCatalogue @Action varchar(12),@Version varchar(80)=NULL,@Json nvarchar(max)=NULL,@Actor nvarchar(256)=NULL AS
|
||||
BEGIN
|
||||
SET NOCOUNT ON;SET XACT_ABORT ON;
|
||||
IF @Action='read' BEGIN SELECT TOP(1) Json FROM dbo.WriterInvestigationCatalogues WHERE @Version IS NULL OR Version=@Version ORDER BY PublishedUtc DESC,Version DESC;RETURN;END;
|
||||
IF @Action<>'publish' OR @Version IS NULL OR ISJSON(@Json)<>1 OR ISNULL(JSON_VALUE(@Json,'$.Version'),'')<>@Version THROW 51000,'Invalid catalogue',1;
|
||||
IF NOT (ISNULL(JSON_VALUE(@Json,'$.Synthetic'),'')='true' AND ISNULL(JSON_VALUE(@Json,'$.SchemaVersion'),'')='1')
|
||||
AND NOT (ISNULL(JSON_VALUE(@Json,'$.Synthetic'),'')='false' AND ISNULL(JSON_VALUE(@Json,'$.SchemaVersion'),'')='2' AND ISNULL(JSON_VALUE(@Json,'$.EngineVersion'),'')='3' AND JSON_QUERY(@Json,'$.Editorial') IS NOT NULL)
|
||||
THROW 51000,'Unsupported catalogue format',1;
|
||||
IF EXISTS(SELECT 1 FROM dbo.WriterInvestigationCatalogues WHERE Version=@Version) THROW 51002,'Catalogue version is immutable; publish a new version',1;
|
||||
INSERT dbo.WriterInvestigationCatalogues(Version,Json,Actor) VALUES(@Version,@Json,@Actor);
|
||||
END;
|
||||
GO
|
||||
@ -2,7 +2,7 @@
|
||||
@model WriterDashboardViewModel
|
||||
<div class="writer3-workspace" aria-label="Story exploration">
|
||||
<section class="writer3-panel writer3-main" tabindex="0">
|
||||
@if(InvestigationAccess.Enabled && Model.BookID.HasValue){<section class="writer3-inset"><h2>What's troubling you about your story?</h2><p>You don't need to know the answer yet. Work through a concern one question at a time.</p><a class="btn btn-primary" asp-controller="WriterInvestigations" asp-action="Index" asp-route-bookId="@Model.BookID">Explore a concern</a><p class="writer3-caption">Development preview · Small synthetic test catalogue; questionnaire answers only, without AI or manuscript analysis.</p></section>}
|
||||
@if(InvestigationAccess.Enabled && Model.BookID.HasValue){<section class="writer3-inset"><h2>What's troubling you about your story?</h2><p>You don't need to know the answer yet. Work through a concern one question at a time.</p><a class="btn btn-primary" asp-controller="WriterInvestigations" asp-action="Index" asp-route-bookId="@Model.BookID">Explore a concern</a><p class="writer3-caption">Explore your concern through questions and practical writing actions. Suggestions use your answers, not manuscript analysis.</p></section>}
|
||||
<p class="eyebrow">Start with your question</p><h2>What would you like to explore?</h2><p>You do not need a finished outline or a linked manuscript. Choose a starting point.</p>
|
||||
<div class="writer3-explore-paths">
|
||||
<a asp-controller="Writer" asp-action="Write" asp-route-projectId="@Model.ProjectID" asp-route-bookId="@Model.BookID"><span class="writer3-path-mark" aria-hidden="true">01</span><div><h3>Develop a chapter or scene</h3><p>Work with your saved chapter intentions, scene ideas and reminders.</p></div><span aria-hidden="true">→</span></a>
|
||||
|
||||
@ -6,3 +6,6 @@
|
||||
<p><a href="/Writer/Explore">Start or resume a test investigation</a> · <a href="/admin/writer-investigations/export">Export current catalogue</a></p>
|
||||
<form method="post" asp-action="Import"><label for="catalogue-json">Structured catalogue JSON</label><textarea id="catalogue-json" class="form-control" name="json" rows="22" maxlength="1000000">@JsonSerializer.Serialize(Model,CatalogueValidator.Json)</textarea><button class="btn btn-outline-secondary" name="operation" value="validate">Validate without saving</button><button class="btn btn-primary" name="operation" value="publish">Publish new immutable version</button></form>
|
||||
<p>Existing investigations remain pinned to their published version. Use a new version identifier for every publication. Synthetic content is accessible only in Development. See Docs/Writer/Investigations for the schema and automated simulation workflow.</p></div>
|
||||
|
||||
<h2>Developer catalogue selection</h2>
|
||||
<form asp-action="Index" method="get"><label>Disposable book ID <input name="bookId" type="number" min="1" required /></label><label>Catalogue version <select name="catalogueVersion"><option>synthetic-3d1-v1</option><option>synthetic-3d1-v2</option><option>guided-investigation-production-v0.1</option></select></label><button class="btn btn-outline-secondary">Open private test</button></form>
|
||||
|
||||
@ -9,12 +9,13 @@
|
||||
<link rel="stylesheet" href="~/css/writer3.css" asp-append-version="true" />
|
||||
<div class="writer3 investigation" data-book-id="@Model.BookID" data-investigation-id="@row?.ID">
|
||||
<header class="writer3-header"><div><p class="eyebrow">Writer · Explore</p><h1>Work through a story concern <help-icon key="writer3.investigations" /></h1><p>You don't need to know the answer yet. We can work through it one question at a time.</p></div></header>
|
||||
<p class="alert alert-info">Development preview · This small test catalogue exercises the mechanism. Its suggestions are not production writing guidance. It uses your answers, without AI or manuscript analysis.</p>
|
||||
@if(Model.Catalogue.Synthetic){<p class="alert alert-info">Development preview · This small test catalogue exercises the mechanism. Its suggestions are not production writing guidance. It uses your answers, without AI or manuscript analysis.</p>}
|
||||
<div class="writer3-workspace">
|
||||
<section class="writer3-panel" aria-labelledby="investigation-question">
|
||||
@if(row==null){
|
||||
<h2 id="investigation-question">What's troubling you about your story?</h2>
|
||||
<form asp-action="Start" method="post"><input type="hidden" name="bookId" value="@Model.BookID" /><fieldset><legend class="visually-hidden">Choose a starting concern</legend>
|
||||
<h2 id="investigation-question">@(Model.Catalogue.Editorial is {} editorial?Model.Catalogue.Questions.Single(q=>q.Id==editorial.OpeningQuestion).Text:"What's troubling you about your story?")</h2>
|
||||
@if(Model.Catalogue.Editorial is {} opening){<p>@Model.Catalogue.Questions.Single(q=>q.Id==opening.OpeningQuestion).Help</p>}
|
||||
<form asp-action="Start" method="post"><input type="hidden" name="bookId" value="@Model.BookID" />@if(Model.Catalogue.Synthetic){<input type="hidden" name="catalogueVersion" value="@Model.Catalogue.Version" />}<fieldset><legend class="visually-hidden">Choose a starting concern</legend>
|
||||
@foreach(var concern in Model.Catalogue.Concerns){<label class="investigation-choice"><input type="radio" name="concern" value="@concern.Id" required /> @concern.Text</label>}
|
||||
</fieldset><button class="btn btn-primary" type="submit">Begin</button></form>
|
||||
}else if(question!=null){
|
||||
@ -29,6 +30,27 @@
|
||||
<button class="btn btn-primary" name="operation" value="answer">Continue</button><button class="btn btn-outline-secondary" name="operation" value="save">Save for later</button></div>
|
||||
</form>
|
||||
}else{
|
||||
@if(Model.Catalogue.Editorial!=null){
|
||||
var result=EditorialConclusion.From(Model.Catalogue,state!);
|
||||
<h2 id="investigation-question" data-conclusion="@result.Kind">@result.Title</h2>
|
||||
<p>@result.Explanation</p><p class="writer3-caption">@result.Qualification</p>
|
||||
@if(result.Findings.Count==0){<h3>A practical next step</h3><p data-writing-action>@result.Action</p>}
|
||||
@foreach(var finding in result.Findings){
|
||||
<section class="writer3-inset"><h3>@finding.Title</h3><p>@finding.Explanation</p>
|
||||
<h4>A practical next step</h4><p data-writing-action>@finding.Action</p>
|
||||
<p>Answers that informed this possibility:</p><ul data-supporting-observations>
|
||||
@foreach(var answer in row.Answers.Where(a=>Model.Catalogue.Questions.Single(q=>q.Id==a.Question).Options.Single(o=>o.Id==a.Option).Contributions.Any(v=>v.Hypothesis==finding.Hypothesis&&v.Weight>0)).Take(3)){
|
||||
var q=Model.Catalogue.Questions.Single(q=>q.Id==answer.Question);<li>@q.Text — @q.Options.Single(o=>o.Id==answer.Option).Text</li>
|
||||
}</ul>
|
||||
@if(state!.Recommendations.Contains(finding.Hypothesis)){
|
||||
@foreach(var cap in Model.Catalogue.Capabilities.Where(d=>Model.Catalogue.Hypotheses.Single(h=>h.Id==finding.Hypothesis).Capabilities.Contains(d.Id)&&state.AvailableCapabilities.Contains(d.Id))){
|
||||
<p>@cap.Description</p><form asp-action="Open" method="post" target="_blank"><input type="hidden" name="bookId" value="@Model.BookID"/><input type="hidden" name="id" value="@row.ID"/><input type="hidden" name="version" value="@row.Version"/><button class="btn btn-primary" name="capability" value="@cap.Id">@cap.ActionText <span class="visually-hidden">(opens another tab; return here afterwards)</span></button></form>
|
||||
}
|
||||
}
|
||||
</section>
|
||||
}
|
||||
@if(result.Findings.Count==0){<p>Your observations so far:</p><ul data-supporting-observations>@foreach(var a in row.Answers.TakeLast(3)){var q=Model.Catalogue.Questions.Single(q=>q.Id==a.Question);<li>@q.Text — @q.Options.Single(o=>o.Id==a.Option).Text</li>}</ul>}
|
||||
}else{
|
||||
var conclusion=InvestigationConclusion.From(Model.Catalogue,state!);
|
||||
<h2 id="investigation-question" data-conclusion="@conclusion.Kind">@conclusion.Title</h2>
|
||||
<p>@conclusion.Message</p>
|
||||
@ -39,9 +61,10 @@
|
||||
<p>Answers that informed this suggestion:</p><ul>@foreach(var evidence in state.Evidence.Where(e=>e.Hypothesis==id&&e.Raw>0&&!e.Uncertain).DistinctBy(e=>e.Question).Take(3)){var q=Model.Catalogue.Questions.Single(q=>q.Id==evidence.Question);<li>@q.Text — @q.Options.Single(o=>o.Id==evidence.Option).Text</li>}</ul>
|
||||
@foreach(var cap in Model.Catalogue.Capabilities.Where(d=>h.Capabilities.Contains(d.Id)&&state.AvailableCapabilities.Contains(d.Id))){<p>@cap.Description</p><form asp-action="Open" method="post" target="_blank"><input type="hidden" name="bookId" value="@Model.BookID"/><input type="hidden" name="id" value="@row.ID"/><input type="hidden" name="version" value="@row.Version"/><button class="btn btn-primary" name="capability" value="@cap.Id">@cap.ActionText <span class="visually-hidden">(opens another tab; return here afterwards)</span></button></form>}
|
||||
</section>}
|
||||
}
|
||||
@if(row.Accepted){<p role="status">Your response is saved. Return to this investigation whenever you need it.</p>}
|
||||
<form asp-action="Answer" method="post"><input type="hidden" name="bookId" value="@Model.BookID"/><input type="hidden" name="id" value="@row.ID"/><input type="hidden" name="version" value="@row.Version"/>
|
||||
<div class="investigation-actions">@if(state.Recommendations.Count>0){<button class="btn btn-outline-secondary" name="operation" value="accept">That sounds right</button>}
|
||||
<div class="investigation-actions">@if(state!.Recommendations.Count>0){<button class="btn btn-outline-secondary" name="operation" value="accept">That sounds right</button>}
|
||||
<button class="btn btn-outline-secondary" name="operation" value="disagree">That's not quite what I meant</button>
|
||||
@if(row.Answers.Count<Model.Catalogue.MaxAnswers&&state.Candidates.Count>0){<button class="btn btn-outline-secondary" name="operation" value="further">I'd like to investigate further</button>}
|
||||
<button class="btn btn-outline-secondary" name="operation" value="save">Save for later</button></div></form>
|
||||
@ -50,8 +73,8 @@
|
||||
</section>
|
||||
<aside class="writer3-panel" aria-label="Your investigations">
|
||||
@if(row!=null){<h2>Your answers</h2><p>Your answers are saved when you continue. Changing one recomputes the investigation; earlier versions remain in its history.</p><ol>@foreach(var a in row.Answers){var q=Model.Catalogue.Questions.Single(q=>q.Id==a.Question);<li><a asp-action="Index" asp-route-bookId="@Model.BookID" asp-route-id="@row.ID" asp-route-question="@a.Question">@q.Text</a><p>@q.Options.Single(o=>o.Id==a.Option).Text</p></li>}</ol>}
|
||||
<h2>Continue later</h2><ul>@foreach(var saved in Model.Saved){<li><a asp-action="Index" asp-route-bookId="@Model.BookID" asp-route-id="@saved.ID">@Model.Catalogue.Concerns.FirstOrDefault(c=>c.Id==saved.Concern)?.Text · @saved.UpdatedUtc.ToString("dd MMM HH:mm") UTC</a></li>}</ul>
|
||||
@if((await Authorization.AuthorizeAsync(User,null,"AdminOnly")).Succeeded){<p><a href="/admin/writer-investigations">Test catalogue and simulator</a></p>@if(row!=null){<a href="/admin/writer-investigations/simulator?bookId=@Model.BookID&id=@row.ID" target="_blank">Private diagnostics and replay</a>}}
|
||||
<h2>Continue later</h2><ul>@foreach(var saved in Model.Saved){<li><a asp-action="Index" asp-route-bookId="@Model.BookID" asp-route-id="@saved.ID">@(((Dictionary<Guid,string>)ViewData["SavedConcernLabels"]!)[saved.ID]) · @saved.UpdatedUtc.ToString("dd MMM HH:mm") UTC</a></li>}</ul>
|
||||
@if((await Authorization.AuthorizeAsync(User,null,"AdminOnly")).Succeeded){<p><a href="/admin/writer-investigations">Catalogue administration and simulator</a></p>@if(row!=null){<a href="/admin/writer-investigations/simulator?bookId=@Model.BookID&id=@row.ID" target="_blank">Private diagnostics and replay</a>}}
|
||||
</aside>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
113
Tools/WriterInvestigations/build_production_v01.py
Normal file
113
Tools/WriterInvestigations/build_production_v01.py
Normal file
@ -0,0 +1,113 @@
|
||||
"""Build reviewed structured evidence metadata around the verbatim, frozen editorial source."""
|
||||
import json
|
||||
from pathlib import Path
|
||||
ROOT=Path(__file__).resolve().parents[2];D=ROOT/'Docs/Writer/Investigations'
|
||||
source=json.loads((D/'Production-Editorial-Source-v0.1.json').read_text())
|
||||
# ID, author-safe description, heading, practical exercise, existing capability IDs.
|
||||
areas=[
|
||||
('disconnected','Disconnected plot events','Some events may need stronger connections','Choose three important events. Write how each one changes the situation and makes the next event possible.',['threads','timeline']),
|
||||
('causality','Weak cause and effect','Choices and consequences may need a clearer chain','For three important events, identify the decision that caused each event, what changed and what new difficulty followed.',['threads']),
|
||||
('agency','Passive protagonist','Your main character may need more influence over events','Choose a turning point. Give the main character a consequential choice, then trace the new problem that choice creates.',['characters','threads']),
|
||||
('direction','Unclear story direction','Your story may need a clearer direction','Write one sentence about what the main character is trying to achieve. Sketch two possible next decisions and compare their consequences.',['threads']),
|
||||
('motivation','Unconvincing character motivation','Some decisions may need clearer reasons','Choose one difficult decision. List what the character wants, what they fear losing and why this choice makes sense to them now.',['characters']),
|
||||
('development','Limited character development','Your characters may need more room to change','Compare a character before and after three major events. Record what each experience changes in their behaviour, outlook or relationships.',['characters']),
|
||||
('relationships','Underdeveloped relationships','Relationships may need to affect more of the story','Choose two characters. Identify what each wants from the other, where those wishes conflict and one decision that changes their relationship.',['relationships']),
|
||||
('slow','Slow or repetitive scenes','Some scenes may need a clearer purpose','Choose a slow scene. Note what changes between its beginning and end, then identify description or dialogue that does not contribute to that change.',['write','review']),
|
||||
('rushed','Rushed events and consequences','Important events may need more room for their consequences','Choose an important event. Add a beat for immediate reaction, a decision shaped by it and a later consequence. Compare the pace before cutting anything.',['write','review']),
|
||||
('conflict','Weak conflict','Obstacles may need to put more pressure on choices','Choose a goal and its main obstacle. Make progress require a difficult choice or cost, rather than resolving the obstacle immediately.',['threads','write']),
|
||||
('stakes','Insufficient stakes','What is at risk may need to feel more concrete','Write what the main character could lose if they fail, why that loss matters to them and where the reader first sees that risk.',['characters','write']),
|
||||
('emotion','Weak emotional impact','Emotional moments may need a stronger connection to action','Choose an emotional moment. Identify its trigger, show a specific reaction and let that feeling influence the character’s next decision.',['review','write']),
|
||||
('chronology','Chronology inconsistencies','The sequence and timing of events may need checking','Place the relevant events in order. Note elapsed time and check that each consequence occurs after its cause.',['timeline']),
|
||||
('whereabouts','Character whereabouts problems','Character movement may need a clearer record','For one complicated sequence, record where each character starts, how they move and when they arrive. Check that travel and overlapping actions are possible.',['timeline']),
|
||||
('knowledge','Character knowledge inconsistencies','Who knows what may need a closer check','Choose one revelation. List who learns it, how and when, then check earlier scenes for decisions that depend on knowing it.',['timeline']),
|
||||
('continuity','General continuity difficulties','Established details may need a more dependable record','Choose a detail that changed. Record its current version, locate later scenes that depend on it and check those scenes against the same reference.',['timeline','characters']),
|
||||
('unclear','Unresolved or unclear concern','Start with one moment that does not feel right','Choose a short passage. Note where your interest, understanding or emotional connection changes, then describe what you hoped the passage would achieve.',[])]
|
||||
# Evidence is deliberately sparse: absence/uncertainty is never positive confirmation.
|
||||
E={
|
||||
'Q02':{'A':{'disconnected':-3,'causality':-2},'B':{'disconnected':3,'causality':2},'C':{'disconnected':1,'direction':1}},
|
||||
'Q03':{'A':{'agency':-3,'causality':-2,'disconnected':-1},'B':{'agency':3,'causality':1},'C':{'disconnected':3,'causality':3}},
|
||||
'Q04':{'A':{'direction':-3},'B':{'direction':2},'C':{'direction':3},'D':{'direction':2}},
|
||||
'Q05':{'A':{'motivation':-3},'B':{'motivation':2},'C':{'motivation':3}},
|
||||
'Q06':{'A':{'development':-3},'B':{'development':2},'C':{'development':3}},
|
||||
'Q07':{'A':{'relationships':-3,'agency':-1},'B':{'relationships':2},'C':{'relationships':3},'D':{'continuity':2}},
|
||||
'Q08':{'A':{'slow':2},'B':{'slow':2},'C':{'rushed':2},'D':{'slow':1,'rushed':1}},
|
||||
'Q09':{'A':{'slow':2},'B':{'slow':3,'conflict':1},'C':{'slow':2},'E':{'rushed':2,'slow':-2}},
|
||||
'Q10':{'A':{'rushed':-3,'emotion':-1},'B':{'rushed':2,'emotion':1},'C':{'rushed':3,'emotion':2}},
|
||||
'Q11':{'A':{'conflict':-3},'B':{'conflict':3},'C':{'conflict':3,'stakes':1}},
|
||||
'Q12':{'A':{'stakes':-3,'conflict':-1},'B':{'stakes':2,'conflict':1},'D':{'stakes':3,'conflict':2}},
|
||||
'Q13':{'A':{'emotion':-3},'B':{'emotion':3},'C':{'emotion':2,'rushed':2}},
|
||||
'Q14':{'A':{'chronology':3,'continuity':1},'B':{'whereabouts':3,'continuity':1},'C':{'knowledge':3,'continuity':1},'D':{'continuity':3},'E':{'continuity':3}},
|
||||
'Q15':{'A':{'continuity':-1},'B':{'continuity':2},'C':{'continuity':1},'D':{'continuity':2}},
|
||||
'Q16':{'A':{'continuity':3},'B':{'continuity':3},'C':{'chronology':1,'whereabouts':1,'continuity':2},'D':{'knowledge':3,'continuity':1}},
|
||||
'Q17':{'A':{'slow':1,'conflict':1,'stakes':1},'B':{'motivation':1,'emotion':1},'C':{'slow':1,'rushed':1},'D':{'causality':1},'E':{'continuity':1}},
|
||||
'Q18':{'A':{'direction':1},'B':{'motivation':1},'C':{'slow':1},'D':{'emotion':1,'conflict':1},'E':{'continuity':1}},
|
||||
'Q19':{'A':{'direction':1},'B':{'motivation':1},'C':{'causality':1,'slow':1},'D':{'emotion':1,'conflict':1},'E':{'continuity':1}}}
|
||||
# One real question = one evidence dimension; related unsure-route items share BOTH dimension and group.
|
||||
dims=['routing','event-connections','story-driver','direction','motives','development','relationships','pacing-section','scene-content','consequences','obstacles','stakes','emotion','continuity-kind','record-keeping','contradiction-cause','reported-concern','reported-concern','reported-concern']
|
||||
routes={k:[f'Q{n:02}' for n in nums] for k,nums in zip('ABCDEF',[(2,3,4),(5,6,7),(8,9,10),(11,12,13),(14,15,16),(17,18,19)])}
|
||||
# Follow-up links are relevance hints, not fixed next-question pointers or prerequisite journeys.
|
||||
related={
|
||||
'Q02':['Q03','Q04','Q11','Q14'], 'Q03':['Q02','Q05','Q07','Q11'], 'Q04':['Q03','Q05','Q12','Q18'],
|
||||
'Q05':['Q06','Q07','Q03','Q13','Q17'], 'Q06':['Q05','Q07','Q10','Q13'], 'Q07':['Q05','Q06','Q03','Q15'],
|
||||
'Q08':['Q09','Q10','Q11','Q13'], 'Q09':['Q08','Q10','Q11','Q02'], 'Q10':['Q08','Q09','Q06','Q13'],
|
||||
'Q11':['Q12','Q13','Q03','Q09'], 'Q12':['Q11','Q13','Q04','Q05'], 'Q13':['Q11','Q12','Q05','Q10','Q17'],
|
||||
'Q14':['Q15','Q16','Q02','Q07'], 'Q15':['Q14','Q16','Q07','Q17'], 'Q16':['Q14','Q15','Q02','Q10'],
|
||||
'Q17':['Q18','Q19'], 'Q18':['Q17','Q19'], 'Q19':['Q17','Q18']}
|
||||
follow={};questions=[]
|
||||
uncertain={'Q02':['D'],'Q03':['D'],'Q05':['D'],'Q06':['D'],'Q08':['E'],'Q09':['D'],'Q10':['D'],'Q11':['D'],'Q12':['C'],'Q13':['D'],'Q16':['E'],'Q17':['F'],'Q18':['F'],'Q19':['F']}
|
||||
for n,q in enumerate(source,1):
|
||||
id=q['Id'];effects=E.get(id,{});hs=sorted({h for a in effects.values() for h in a}) or ['unclear'];options=[]
|
||||
for a in q['Options']:
|
||||
aid=a['Id'];weights=effects.get(aid,{})
|
||||
options.append(dict(Id=aid,Text=a['Text'],Uncertain=aid in uncertain.get(id,[]),Contributions=[dict(Hypothesis=h,Dimension=dims[n-1],Aspect='general',Weight=w) for h,w in weights.items()]))
|
||||
nxt=list(related.get(id,[]))
|
||||
if id=='Q01':nxt=routes[aid]
|
||||
elif id in ['Q17','Q18','Q19'] and aid in 'ABCDE':nxt=routes[aid]+nxt
|
||||
# Rushing isn't a slowness problem. Knowledge and location concerns retain their continuity focus.
|
||||
if id=='Q09' and aid=='E':nxt=['Q10','Q13','Q08']
|
||||
if id=='Q14' and aid in 'ABC':nxt=['Q16','Q15','Q02' if aid=='A' else 'Q07']
|
||||
if aid in uncertain.get(id,[]) and id not in ['Q17','Q18','Q19']:nxt=next((xs for xs in routes.values() if id in xs),[])
|
||||
if weights and all(w<=0 for w in weights.values()):nxt=next((xs for xs in routes.values() if id in xs),[])
|
||||
follow[id+'.'+aid]=dict(Questions=[x for x in dict.fromkeys(nxt) if x!=id],Limitation='A self-report, not manuscript evidence. '+('Uncertain/unfinished development: no positive contribution.' if aid in uncertain.get(id,[]) else 'A symptom can have several explanations; weights are not probabilities.'))
|
||||
questions.append(dict(Id=id,Text=q['Text'],Help=q.get('Help',''),Purpose='ActionPreference' if id=='Q01' else 'Discrimination' if n>=17 else 'Discovery',Group='uncertain-route-signals' if n>=17 else id.lower(),InformationValue=2,Hypotheses=hs,Dimensions=[dims[n-1]],Options=options))
|
||||
# Challenges are declared only where a real answer challenges the named hypothesis.
|
||||
challenges={h:sorted(q['Id'] for q in questions if any(v['Hypothesis']==h and v['Weight']<0 for o in q['Options'] for v in o['Contributions'])) for h,*_ in areas}
|
||||
caps=json.loads((D/'synthetic-catalogue-v2.json').read_text())['Capabilities']
|
||||
for c in caps:
|
||||
c['Description']={'characters':'Record and review character details, motivations and development.','write':'Compare chapter and scene intentions and develop a scene with a clear change.','threads':'Lay out plot lines, threads and the scene events that develop them.','timeline':'Inspect the order of scenes and their recorded story context.','relationships':'Review and develop recorded relationships between characters.'}[c['Id']]
|
||||
caps.append(dict(Id='review',Name='Review your writing',Description='Read the canonical manuscript and record anchored observations or revision decisions.',Resolver='Review',ActionText='Open Review',Available=True,RequiresBook=True,RequiresProject=True,Context='book',Authority='ProjectAccess'))
|
||||
hypotheses=[];templates=[]
|
||||
for h,description,title,action,mapped in areas:
|
||||
hd=sorted({v['Dimension'] for q in questions for o in q['Options'] for v in o['Contributions'] if v['Hypothesis']==h})
|
||||
hd=hd or ['reported-concern']
|
||||
hypotheses.append(dict(Id=h,Description=description,Summary=title,Reason='Your answers suggest this is an area worth examining.',Uncertainty='This is based on your answers, not an analysis of your manuscript.',Dimensions=hd,Capabilities=mapped,MinDimensions=2,MinGroups=2,Threshold=4))
|
||||
templates.append(dict(Hypothesis=h,Title=title,Explanation='Your answers point towards '+description.lower()+'. The observations below show what informed that suggestion.',Action=action,Qualification='This is based on your answers, not an analysis of your manuscript. Other explanations may fit.'))
|
||||
# Only a single direct item is supplied for some areas: never invent independent evidence to qualify them.
|
||||
tentative=[h['Id'] for h in hypotheses if len({v['Dimension'] for q in questions for o in q['Options'] for v in o['Contributions'] if v['Hypothesis']==h['Id'] and v['Weight']>0})<2 or not challenges[h['Id']]]
|
||||
catalogue=dict(SchemaVersion=2,EngineVersion=3,Version='guided-investigation-production-v0.1',Synthetic=False,MinAnswers=8,MaxAnswers=12,Dimensions=sorted(set(dims)),Concerns=[dict(Id=a['Id'],Text=a['Text'],Priors={h:1 for q in questions if q['Id'] in routes[a['Id']] for h in q['Hypotheses']}) for a in source[0]['Options']],Hypotheses=hypotheses,Questions=questions,Capabilities=caps,Editorial=dict(Version='results-v0.1',OpeningQuestion='Q01',Routes=routes,FollowUps=follow,Challenges=challenges,TentativeOnly=tentative,Results=templates))
|
||||
for result in templates:
|
||||
result['States']=['healthy','uncertain'] if result['Hypothesis']=='unclear' else ['tentative','ambiguous','conflicting']+([] if result['Hypothesis'] in tentative else ['supported','unavailable'])
|
||||
state_text={
|
||||
'supported':('A useful next step','Your answers support the following next step. The observations below explain why it may help.'),
|
||||
'unavailable':('A relevant tool is not available right now','Your answers suggest a useful direction, but its PlotDirector tool cannot be offered right now. You can still try the writing action below.'),
|
||||
'conflicting':('Some answers need a closer look','Some answers point in different directions. They may describe different moments, or your understanding may have changed. Revisit the answers below before treating either possibility as settled.'),
|
||||
'ambiguous':('There is more than one way to understand these answers','Different interpretations fit parts of your answers, which may describe different moments or aspects of the story. Try one of the actions below and compare what you learn before choosing a tool.'),
|
||||
'tentative':('One possibility may be worth exploring','This is a plausible direction, rather than a confirmed finding. These questions leave some of it uncertain; try the action below and see whether it fits your experience.'),
|
||||
'healthy':('Your answers do not point to a clear writing problem','The elements you described as working well do not justify inventing a problem. You can build on those strengths while checking the moment that first concerned you.'),
|
||||
'uncertain':("Let's start with one moment in your story",'You do not need to name the problem yet. The answers so far do not justify choosing an explanation or a tool. A small, concrete reading exercise may help you find a starting point.')}
|
||||
catalogue['Editorial']['States']={kind:dict(Title=title,Explanation=explanation,Action='Choose a scene you feel works well. Identify the choice, change or emotional beat that makes it effective, then compare it with the passage that concerned you.' if kind=='healthy' else templates[-1]['Action'],Qualification='These suggestions are based on your questionnaire answers, not an analysis of your manuscript.') for kind,(title,explanation) in state_text.items()}
|
||||
caveats={
|
||||
'Q02.C':'Not knowing the arrangement is weak evidence only; it does not establish that events are disconnected.',
|
||||
'Q02.D':'An unfinished event sequence is not proof of a writing defect.',
|
||||
'Q06.B':'Some characters may intentionally remain unchanged. This does not mean every character needs an arc.',
|
||||
'Q07.B':'Emotionally important relationships need not always drive plot; this is a possibility to examine, not a rule.',
|
||||
'Q09.A':'Description is not inherently slow; this answer concerns scenes the author already experiences as slow.',
|
||||
'Q14.E':'Several does not mean all: only general continuity receives support, not every specific subtype.',
|
||||
'Q15.A':'Maintained records weakly challenge organisational difficulty; they do not prove that story details are consistent.',
|
||||
'Q15.C':'Relying on memory is context, not proof of errors; it contributes only weak support.',
|
||||
'Q16.C':'Timing OR location is ambiguous: each specific subtype receives only weak support; general continuity receives moderate support.',
|
||||
'Q17.A':'Loss of interest has many possible causes; each contribution is weak and shares the preference-probe group.',
|
||||
'Q19.C':'Flow can concern pace or connections; both contributions are weak and do not establish a diagnosis.'}
|
||||
for key,note in caveats.items():follow[key]['Limitation']+=' '+note
|
||||
(D/'production-catalogue-v0.1.json').write_text(json.dumps(catalogue,ensure_ascii=False,indent=2)+'\n')
|
||||
print('Built',len(questions),'questions',sum(len(q['Options']) for q in questions),'answers;',len(areas),'areas; tentative-only:',tentative)
|
||||
Loading…
x
Reference in New Issue
Block a user