The guide
An invented world earns trust by never contradicting itself
Readers forgive dragons and spells, but not a hero who attends a council two days after her own funeral. A story bible kept as data can catch that.
- 365.2425 days mean Gregorian year from the 4, 100 and 400 rule
- W-252 Soundex code of Washington on the National Archives page
- 2 edits Damerau-Levenshtein distance from CA to ABC
- 1,095,727 days Gregorian days from year 1 to 3000 checked against Python
Read the full guide Fold the guide
A reader will accept almost anything about an invented world on the first page. Moons that rise twice a night, a guild that taxes the wind, a queen who speaks only in riddles: all of it goes in without complaint. What the same reader will not accept is a world that forgets its own rules. The moment a character who died in chapter four is pouring wine in chapter nine, the spell breaks, and it breaks harder than any piece of strange magic ever could.
That is the quiet bargain of fiction set somewhere else. The writer may invent freely, but every invention becomes a promise.
Why consistency is the real magic
Writing about worldbuilding has long noticed this tension. Designers who start from small details and build outward get a setting that is quick to use, but the same approach can leave a world riddled with inconsistencies, because no one ever stepped back to see how the pieces fit. From a game designer’s point of view, consistency is named as an important element, since the world is the floor the story stands on. Tolkien put the goal another way and spoke of enchantment. Enchantment is fragile. A reader who has to stop and count on their fingers is no longer enchanted.
The trouble is scale. A short story might hold five names and a single season. A trilogy holds hundreds of people, dozens of places, wars, marriages, migrations and a calendar that nobody on Earth has ever used. No memory is good enough to keep all of it straight, and the errors that slip through are rarely dramatic. They are small arithmetic slips: a mother who would have been nine when her son was born, a messenger who rides between two cities on the same afternoon, a duke who outranks the king who appointed him.
Writers have always fought this with a story bible, a notebook or folder that records who was born when, who married whom, what each place is called and what the magic is allowed to do. The bible is the right idea. Its weakness is that it is usually prose, and prose cannot check itself. A note that says the elder was born in the spring of 1150 does nothing when a later note says her daughter arrived in 1159. Both notes are true to the writer who wrote them. Only arithmetic can see that they disagree.
So the useful step is to keep the bible as data. People get a birth and a death. Events get a start, an end, a place and a list of who was there. Relations get a direction: parent of, rules over, located in. Once the facts have that shape, a machine can test them against stated rules, exactly, and every rule can be read and argued with.
Building a calendar of your own
Nothing in an invented world is dated in the Gregorian calendar, so a checker that only understands January is no use. The answer is to let the writer define the calendar and then reduce every date to a single count of days. A calendar, after all, is just a system for naming periods of time, and any naming can be converted to a running number and back.
The real calendars show what a writer needs. A year is split into named months of fixed length. Because the solar year is not a whole number of days, many calendars insert an extra day now and then; that insertion is called intercalation, and a year that receives the extra day is a leap year. The Gregorian rule is the familiar case: a leap year every fourth year, except century years, unless the century is divisible by 400. Over a 400 year cycle that gives 146,097 days and a mean year of 365.2425 days.
The same three part rule, every N years except every M unless every K, covers a great many invented calendars as well. The example world on this page uses six months, five of 61 days and one of 60, for 365 days in a common year. It adds a leap day every fourth year except every 128th, which makes a mean year of 365.2421875 days, a fraction closer to the solar year than the Gregorian rule manages. A writer who wants that level of care can have it in a few fields.
Two details trip people up. The first is year zero. Historians count from 1 BC straight to AD 1, while astronomers include a year 0 and number earlier years as negative, which makes arithmetic across the boundary easy. An invented calendar has to pick one, and the choice changes how many years separate two dates. The second is checking the arithmetic itself. The method here was tested by setting the calendar to the proleptic Gregorian rule, which extends the modern rule backward before it was adopted, and comparing it with the ordinal numbers that Python’s date library assigns. Every one of the 1,095,727 days from year 1 to the end of year 3000 matched.
Timelines, lifespans and family trees
With every date reduced to a day number, the obvious questions become simple comparisons. Did anyone take part in an event before they were born? After they died? Was a parent younger than the age the writer considers believable at the birth of a child? Each of these is a comparison of two numbers, and each needs one careful decision about vague dates. A birth recorded only as 1159 is really a span from the first to the last day of that year. The safest reading treats it as a closed interval, one that includes both of its ends, and raises a finding only when the contradiction holds for every day the vague date could mean.
Closed intervals matter most for the hardest check, someone in two places at once. Two events overlap when each begins no later than the other ends. If the ends are counted, an event on the twelfth day of a month and a fair running from the twelfth to the fourteenth share a day, and a person listed at both in two cities is in trouble. Treat the ranges as open at one end and that shared single day quietly disappears. The checker here was tested against exactly that mistake, and the mistaken version failed the test it should fail.
Here is a worked example you can repeat in the tool. In the example world, Elder Example is born on day 10 of the second month in 1150. Young Example, listed as Elder’s child, has a birth year of 1159 and nothing more. The latest possible birth in 1159 is still before Elder’s tenth birthday, so the most Elder can be is 9. The rule is set to at least 14, so the checker reports that Elder is at most 9 at the birth. Change the rule to 9 and the finding goes away. Change the child’s birth to 1170 and it goes away too.
That is the whole trick. The rule is in plain view, the arithmetic is exact, and the writer decides what counts as wrong.
Family trees and chains of command add another kind of error. A parent of relation must never loop back on itself, because nobody is their own ancestor; the same holds for rules over, and for places that sit inside other places. In graph terms these relations must form a directed acyclic graph, which is a graph with an ordering where every arrow points forward. Depth first search finds a loop when it meets a node it is still exploring, and the path back to that node is the cycle, which can be printed for the writer to fix. The checker’s verdict was compared with a separate topological sort over hundreds of random graphs, and they agreed every time.
Names that are too alike, and the manuscript itself
Readers also stumble over names. Two characters called Rival and Rivel will be confused, however different they are on the page. Edit distance gives a measure: the Levenshtein distance counts the fewest single letter insertions, deletions and substitutions that turn one name into another, so kitten and sitting are three apart. The Damerau-Levenshtein form also counts swapping two neighbouring letters as one step, which catches the commonest typing slip; CA becomes ABC in 2 edits.
Sound matters as much as spelling. The Soundex code, used to index United States census records, keeps the first letter of a surname and turns the following consonants into digits by sound group. On the National Archives page, Washington is coded W-252 and Ashcraft A-261. Two names that share a code may be heard as the same name by a reader. Soundex was designed for English surnames, so it is a prompt to look, not a verdict, and every pair it raises can be ignored.
The last test is the manuscript. A bible that says a character is called Heir is only half the story; the draft might call her Hier in chapter twelve. Reading the draft on the device, splitting it into chapters by its headings and counting every name and alias by whole word shows where each character appears and which capitalised words match nothing in the bible. A word that is one edit away from a known name is often a typo, and sometimes a forgotten minor character who deserves an entry.
None of this writes a sentence for you, and none of it judges meaning. A checker cannot tell whether a betrayal is earned or a battle is plausible. It can only hold every date, relation and name you gave it and report, by rules you can read and change, where they disagree. For a writer living inside a world too large to remember, that is the part worth handing over.
Sources
Every source consulted for this guide. Links checked October 25, 2026.
- Worldbuilding Wikipedia (CC BY-SA 4.0)
- Calendar Wikipedia (CC BY-SA 4.0)
- Leap year Wikipedia (CC BY-SA 4.0)
- Intercalation (timekeeping) Wikipedia (CC BY-SA 4.0)
- Gregorian calendar Wikipedia (CC BY-SA 4.0)
- Proleptic Gregorian calendar Wikipedia (CC BY-SA 4.0)
- Interval (mathematics) Wikipedia (CC BY-SA 4.0)
- Directed acyclic graph Wikipedia (CC BY-SA 4.0)
- Topological sorting Wikipedia (CC BY-SA 4.0)
- Levenshtein distance Wikipedia (CC BY-SA 4.0)
- Damerau-Levenshtein distance Wikipedia (CC BY-SA 4.0)
- The Soundex Indexing System US National Archives and Records Administration
- RFC 8259: The JavaScript Object Notation (JSON) Data Interchange Format IETF, RFC Editor
- CommonMark Spec, version 0.31.2 John MacFarlane (CC BY-SA 4.0)
- ECMA-376: Office Open XML file formats Ecma International
- datetime - Basic date and time types Python Software Foundation
- CSV Injection OWASP Foundation (CC BY-SA 4.0)
- DecompressionStream: DecompressionStream() constructor MDN Web Docs (CC BY-SA 2.5)