All articles Beginner handbook

How to Use AI to Design Legal Systems That Create Story Conflict

Murdok Published August 4, 2026 Updated August 4, 2026 10 min read

Why most fictional legal systems are decorative, not dramatic

Open ten fantasy novels and you'll find ten legal systems that work exactly as advertised. The empire has laws. The laws are enforced. The council rules. Nobody ever gets a parking-ticket equivalent that ruins their week, and nobody ever exploits a technicality to get away with murder. It's furniture. It sits in the background so the world feels "built," but it never does anything. The problem is that most writers design legal systems the way they design flags and currencies — as texture, not as machinery. A real legal system is a machine with moving parts that jam, grind, and occasionally crush the wrong person. It's not "murder is illegal here." It's "murder is illegal here, unless the victim was a serf, in which case the fine is fifteen silver paid to the lord, not the family, and the local magistrate hasn't updated the fee schedule in forty years because raising it would require convening a council that hasn't met since the last succession crisis." That second version generates plot. The first one generates a wiki entry.
A legal system only becomes dramatically useful once it has an author's opinion buried inside it — a place where the rule and the reality don't match, and someone in your story has to live in that gap.
If you're already using AI to help with your write a book with AI process, this is a place where AI genuinely earns its keep — not by inventing decorative lore, but by stress-testing the systems you invent until they crack in interesting places. The trick is asking for the crack, not just the system.

Prompting AI to find the gap between written law and lived practice

Ask an AI model to "invent a legal system for my fantasy city" and you'll get exactly what you asked for: a tidy, internally consistent set of rules. That's the wrong ask. What you want is the distance between the law as written and the law as practiced — because that distance is where your characters will live. The move here is to force two passes: first the official code, then the corrupted reality layered on top of it. Don't let the model generate both at once, or it'll smooth the contradiction away before you even see it.
I'm building the legal system for a coastal trading city-state called Verenna in my fantasy novel. First, write me the official legal code as it would appear in a civic archive: five core laws about property, contract, inheritance, smuggling, and blasphemy against the Tide Cult. Keep it formal, bureaucratic, and specific — cite actual penalties and procedures, not vague principles. Then, in a second section, write "How It Actually Works" — a cynical insider's account of how each of these five laws is actually enforced day to day, including which ones are ignored, which ones are enforced selectively against certain groups, which require bribes, and which have a loophole everyone in the city knows about but nobody in the capital has noticed yet.
Why this works: separating the "official" and "actual" layers stops the AI from harmonizing them into something too clean. You're explicitly asking for hypocrisy, and hypocrisy is where character conflict lives. Tweak the five law categories to match your genre — for a LitRPG world you might swap "blasphemy" for "guild licensing" and "smuggling" for "unregistered dungeon looting" (useful if you're running this through an LitRPG writing setup where systems and rules are half the appeal). Once you have both layers, push further and ask the model to identify which specific character role in your cast would notice the gap first — a new magistrate, a smuggler's daughter, a priest who takes the letter of the law seriously. That's your entry point into a scene, not just a worldbuilding document.

Using AI to generate loopholes and jurisdictional conflicts your plot can exploit

Loopholes aren't just fun trivia for your world — they're plot engines. A good loophole is a door your protagonist can walk through that the antagonist didn't think to lock, or vice versa. Jurisdictional conflict works the same way: two authorities both claim power over the same territory or person, and your character gets to exploit the seam between them. The mistake writers make is designing the loophole after they've already written the scene that needs it, which makes it feel convenient and cheap. Do it earlier. Build the loophole into your AI book outline stage, before you're committed to a specific sequence of events, so it can shape the plot rather than rescue it.
Here's my setting: the Kingdom of Ashmere has a national law against practicing blood magic, punishable by exile. But the semi-autonomous marsh territories (the Fen Counties) were granted self-governance under a 200-year-old treaty and have never formally adopted the kingdom's magic laws — they still operate under older common law that never mentioned blood magic at all because it didn't exist yet when the treaty was signed. Give me five ways a clever character (noble, criminal, or lawyer-type) could exploit this jurisdictional gap for personal gain, ranging from petty (avoiding a fine) to major (committing a crime that would be a capital offense in the capital but isn't technically illegal in the Fens). For each one, tell me what would have to go wrong for it to blow up in their face.
Why this works: naming the historical reason for the gap (a treaty that predates the problem) makes the loophole feel structural rather than authorial. Asking for the failure mode alongside the loophole is what turns this into plot instead of a cheat code — you want the reader to feel the tension of "this could work, but—" The "blow up in their face" clause is doing the real work here; that's your second-act complication, pre-built. This same approach works beautifully for courtroom thrillers, political fantasy, or even romance subplots where one character discovers the marriage contract has a clause nobody read — if you're building tension slowly rather than rushing the payoff, this pairs well with the ideas in How to Use AI to Write Romance Tension Without Rushing the Slow Burn, since a legal complication can be exactly the obstacle that keeps two people apart without feeling manufactured.

Designing enforcement asymmetry: who the law actually protects and who it doesn't

Here's the thing nobody puts in their fantasy legal codes: laws are enforced unevenly, on purpose, almost everywhere, always. The law against theft protects the merchant's warehouse fiercely and the beggar's blanket not at all. That asymmetry isn't a bug in your worldbuilding — it's the single most reliable source of conflict a legal system can offer, because it means the "same" law means something completely different depending on who you are. If your system treats every citizen identically, you've built a legal system with no story in it. Ask AI to map the asymmetry directly, by class, faction, species, gender, or whatever axis matters in your world.
My empire has one unified law code, but I want to map out how it's actually enforced differently across four groups: the noble houses, the merchant guilds, temple clergy, and unregistered "ghost" citizens who exist outside the census. For each group, tell me: (1) what crimes they can basically get away with because enforcement looks the other way, (2) what minor infractions get them punished disproportionately harshly compared to other groups, and (3) one specific real-world-feeling bureaucratic mechanism (a fee, a permit, a required witness, a residency requirement) that quietly enforces this asymmetry without the law ever officially naming it. Make the mechanisms boring and procedural, not dramatic — the kind of thing that sounds like paperwork but ruins someone's life.
Why this works: the request for "boring and procedural" mechanisms is deliberate. Dramatic injustice (a cruel edict, a public whipping) reads as spectacle. Procedural injustice (a permit fee only enforced against ghost citizens, a "character witness" requirement no unregistered person can meet) reads as real, because it mirrors how actual systemic inequity operates — quietly, through paperwork, not proclamation. This is also where a story bible AI models actually follow earns its keep. Once you've mapped enforcement asymmetry across factions, that map needs to stay consistent for the rest of the book — otherwise you'll accidentally have the ghost citizens get fair treatment in chapter twelve because you forgot the rule you invented in chapter two. Feed the asymmetry table into your bible as a standing reference, the same way you'd track a fantasy worldbuilding magic system or a Series Bible Template entry, so the AI keeps citing it correctly across drafts.

Prompt sequence: turning your legal system into a courtroom or trial scene with real stakes

All this groundwork is worthless if it stays background lore. The payoff is a scene — a trial, an interrogation, a tribunal, a backroom deal — where the gaps you built actually get used by a character under pressure. Here's a sequence that moves from system to scene in three prompts, each one narrowing the focus. Step one — stakes audit. Before writing dialogue, make sure the trial has something to lose that isn't just "guilty or innocent."
My protagonist Mira is being tried for smuggling under Verenna's maritime law, but the real issue is that the prosecution wants to use this case to establish a legal precedent that would let the crown seize any independent trading vessel "suspected" of smuggling without proof. Mira doesn't know this yet — her lawyer does. List everything that's actually at stake in this trial beyond Mira's freedom: precedents, reputations, unspoken deals, and what each of the four people in the room (Mira, her lawyer, the prosecutor, the presiding magistrate) privately wants the verdict to be and why, even if it contradicts their official role.
Step two — procedural friction. Now ask for the specific legal mechanism that will generate the mid-scene turn.
Using the Verenna legal code we established (maritime smuggling law, the Fen jurisdiction loophole, and the asymmetry where merchant guild members get tried by a guild tribunal instead of royal court), write the moment in Mira's trial where her lawyer realizes the prosecution filed under the wrong jurisdiction because Mira's ship was technically registered in the Fen Counties for tax reasons. Show the lawyer deciding in real time whether to raise the objection immediately (which saves Mira but tips off the crown to fix the loophole for future cases) or stay quiet (which risks Mira's conviction but keeps the loophole alive for the smuggling ring she's secretly part of).
Step three — the scene itself. Only now do you ask for prose, and only once, with the stakes and mechanism already locked.
Write the courtroom scene now, close third person from the lawyer's POV, roughly 1200 words. He's mid-objection when he makes his choice. Let the magistrate be sharp and visibly impatient with procedural games, not a neutral rubber stamp. Don't have anyone explain the jurisdiction loophole in dialogue as if for the reader's benefit — the characters already know their own legal system, so let the tension come from what's implied and withheld, not exposition.
Why this sequence works: stacking the prompts this way prevents the common failure mode where AI-generated courtroom scenes turn into legal exposition dumps disguised as dialogue. By the time you ask for prose, the model already has the stakes, the mechanism, and the character motivations locked from the earlier passes — it just has to dramatize, not invent. That last instruction, banning explanatory dialogue, is doing a lot of quiet work; it's the single most common tell of AI legal-drama writing, and naming it directly heads it off.

Making it stick through revision

Legal-system conflict is exactly the kind of thing that gets quietly flattened during editing, because contradictions look like errors to both human editors and AI ones. When you run this manuscript through edit a book with AI passes, be explicit that the inconsistencies in your legal system are intentional — otherwise a well-meaning revision pass will "fix" your best conflict by making the law consistent again. The Five-Pass Revision Order for AI-Assisted Novels is useful here specifically because it separates continuity passes from prose passes, so you can protect the deliberate contradictions in an early pass and only clean up accidental ones later. It's also worth running your finished chapters through a character consistency check focused specifically on who knows what about the law — it's easy to accidentally let a character reference a loophole before they'd plausibly have learned about it. And if your cast is large enough that titles, ranks, and jurisdictions start blurring together, tools like the Proper Noun Extractor and Character Name Variant Detector catch the small errors — "the Fen Counties" becoming "Fen County" halfway through — that quietly undermine a reader's trust in a system you worked hard to make feel real. If you want to see how different models handle this kind of layered, contradiction-aware prompting, it's worth comparing outputs — see Entangled Text vs ChatGPT or the broader rundown of best AI models for writing for how each one handles procedural nuance versus generic legalese. Some models default to real-world legal jargon that feels out of place in a fantasy setting; others invent flavor at the cost of internal logic. Worth testing before you commit fifty thousand words to one voice.

The takeaway

Don't design your legal system to be correct. Design it to be unevenly true — official on paper, different in practice, enforced by people with their own interests, full of seams two centuries of treaties and amendments never quite closed. Then hand a character a reason to stand in exactly the wrong seam at exactly the wrong time. The system doesn't need to be fair. It needs to be usable — by you, by your plot, and by the person in your story who's about to lose everything to a clause nobody bothered to rewrite.

Try it yourself

Write your own book with AI — free, no credit card required.

Free · No credit card