How to Make a Game Story Without Errors or Plot Holes
Have your AI turn your story into a model and run a checker that walks every path, because reading scenes one by one misses holes that only appear on some paths. The checker hands you the exact path of scenes that breaks a rule, and that path is your proof.
Why does my story have plot holes?
A book is read in one order. A game is not. Your player can skip a side quest, do it early or come back hours later. So a scene can be fine on the path you tried and wrong on another.
Asking your AI to be careful does not fix this. A careful AI still reads one scene at a time, and two choices with two options each already make four paths. You need something that walks all of them.
Which facts and rules catch plot holes?
The model is a list of facts, plus every scene as a step that needs some facts and changes some. For plot holes, these matter most:
- Facts: who is alive, who knows what, who is where, who holds what, and what has happened.
- The dead do not speak. Nobody talks or acts after they died or left.
- Nobody uses knowledge early. Nobody uses a fact before the scene where they learned it.
- No two scenes contradict. A fact never has two different values.
- Nobody is in two places. A person only acts where they are.
What does a real check look like?
Here is a tiny mystery. The baker tells the player that the mayor left on Monday. Then the player goes either to the cellar, where they find a hidden letter, or to the town hall. Both roads lead to the inn, where the player says: "I read the mayor's letter. You were paid to lie."
If you always play through the cellar, this looks fine. We ran this invented story through TLC 2.19 on 2 November 2026. This is TLC's real output. We only left out its housekeeping lines and put each step on one line.
Error: Invariant NobodyUsesWhatTheyNeverLearned is violated.
State 1: scene = "Start", playerUses = {}, playerKnows = {}
State 2: scene = "Bakery", playerUses = {}, playerKnows = {"the mayor left on Monday"}
State 3: scene = "Town hall", playerUses = {}, playerKnows = {"the mayor left on Monday"}
State 4: scene = "Inn", playerUses = {"the hidden letter"}, playerKnows = {"the mayor left on Monday"}
Read it from the top: Start, Bakery, Town hall, Inn. At the inn the player uses the hidden letter, but it is not in the list of what they know, because on this path they never went to the cellar. That path is the proof.
The fix: at the town hall, the clerk now hands the player a copy of the letter. We ran TLC again.
Model checking completed. No error has been found.
8 states generated, 6 distinct states found, 0 states left on queue.
TLC looked at all 6 states the story can reach, and the rule held on every path.
Do I have to read any of this?
No. You never have to read the model or the checker's output, because your AI writes it, runs it and tells you the result in plain words. TLA+ is a language for modelling, and TLC is the tool that checks a model. If TLC cannot run on your computer, your AI can get a ready-made checker through our MCP server and run it in your project. Spielerando never looks at your story.
A pass means your rules held on every path in the model. It does not mean your story is good, and it says nothing about rules nobody wrote down.
Paste this to your AI
Do not just read my story and tell me it looks fine. Model it and check it with a tool.
1. Read my story and story-bible.md. If you cannot see my files, ask me to paste them.
2. Write a TLA+ model of the story in a folder called story-check.
- Facts, as state: who is alive, who knows what, who is where, who holds what, and what has happened.
- Steps: every scene and choice, with what it needs and what it changes. Include side content, because players can do it early, late or never.
- Rules, as invariants: the dead do not speak. Nobody uses knowledge before the scene where they learned it. No two scenes contradict. Nobody acts where they are not.
3. Run the TLC model checker on the model so that it walks every path. If TLC cannot run here, use get_recipe with story-model-check through Spielerando and run that checker in this project. If you can run neither, tell me, and do not claim that anything was checked.
4. For each broken rule, show me the exact path of scenes the checker found, in plain words, and quote the lines of my story behind each step.
5. Do not change my story yet. Suggest one fix for each path and wait for me to pick.
6. After each fix, update the model, run the checker again and show me the result.
From now on, run the checker after every story change. Report only which rules held, how many states were checked and whether the check was cut off. Never tell me the story is good. If the model needs a fact you cannot find, say "I do not know" and ask me. Do not guess.
Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP
How to check it worked
- Play the path it gave you. Follow those exact scenes in the game. You should run into the hole yourself. If you do not, the model does not match the game, so tell your AI.
- Try to cause a hole. Ask for a scene where someone dead walks in. The next check should fail and name the path.
- Play out of order. Do the side content first and the main story last. If a line sounds wrong and no rule caught it, ask for a new rule.
- Hand it to a friend. Ask them to say "wait, what?" out loud whenever something does not add up. The checker only knows the rules you gave it.