Codex of characters and world

Book Codex: Characters, Places, Objects, and Lore with AI-Generated Portraits

An entry for each character, place, object, organization, lore concept, and event in your story — and the AI automatically injects them into the chapters where they appear, so that two hundred pages in, no one changes their name, age, or eye color.

The problem with writing a long book isn't inventing the world: it's remembering it by chapter twenty.

The Codex is the bible of your book within KDP Author Studio, AIsToHire's tool for writing and publishing books on Amazon KDP (https://aistohire.com/kdp-author-studio-create-books-amazon-kdp-ai-136). You create an entry for each element of your story and choose its type: character, place, object, lore, organization, or event. Each type comes with its own fields, so you don't fill out a generic template: a character has a role, age, appearance, past, motivation, fear, character arc, voice, and associated objects; a place has a type, how it smells and sounds, history, inhabitants, climate, and rules; an organization has a goal, members, and territory.

What makes these entries useful is that they don't stay static. When you generate a chapter, the app scans the outline and text for which Codex entries are mentioned — by their name and also by any of their up to eight aliases — and passes the entries that actually appear in that scene to the model, up to twelve per generation, ordered by how many times they appear. Those you mark as «always include» travel with every chapter, no matter what: the narrator, the protagonist, the city where everything takes place.

You can also let the AI do the heavy lifting. Autofill completes the fields you've left empty and drafts a 60 to 120-word description, respecting what you've already written — it never overwrites your text — and without contradicting the rest of the book's entries. The portrait generator creates a reference image based on the appearance and sensory details in the entry, matching the book's visual style: square portrait for characters, landscape orientation for places, objects, and organizations. And the detection feature reads an already written chapter and suggests up to eight new elements that have appeared on the fly and don't yet have an entry, complete with their aliases and a summary of what the text says about them; you accept them, and they are created.

In addition to the list, there are two more views for the same data: the timeline, which the AI extracts from your chapters, ordering up to sixty events by narrative time — not by reading order — and distinguishing flashbacks and flashforwards; and the relationship map, where each entry connects to others, indicating the type of bond and its intensity from 1 to 5. If you delete an entry, the relationships pointing to it are automatically cleared.

Benefits of Codex of characters and world

Six entry types with their own fields

character, place, object, lore, organization, and event. Each asks for what truly matters about it — the character's fear and character arc, the place's climate and rules, the object's origin and power — instead of a generic «notes» field where everything ends up equally vague.

Automatic injection into chapters

the app detects by name and alias which entries appear in the scene you're about to write and passes their entries to the model, up to twelve per generation. You don't have to copy and paste descriptions into any prompt.

Mark 'always include' for what can never be missed

protagonist, narrator, the world where everything happens. These entries travel with every chapter even if their name doesn't appear in the outline.

Autocomplete that doesn't overwrite your work

the AI only fills empty fields and enhances brief ones, checking the rest of the Codex to avoid contradictions. What you've written remains as is.

AI-generated portraits and visual references directly from the entry

the appearance and sensory details you wrote are transformed into an image in the book's visual style. This helps to establish a character's look and avoid describing them differently twice.

Dialogue matrix per character

how they react upon entering a scene, how directly they respond, sentence length, register, how they evade what they don't want to answer, how they change depending on who they're talking to, their verbal tics, and three example lines. Plus a comparator that detects which two characters sound too similar and tells you how to differentiate them.

Detection of what you've already written

run a chapter through the detector, and it suggests missing entries, including aliases. The Codex will no longer be outdated compared to the manuscript.

Timeline and relationship map on the entries themselves

up to sixty events ordered by narrative time with marked flashbacks, and links between entries with type and intensity. Two more ways to see if your story holds together.

Vera Langley

Start with the first entry

KDP Author Studio is AIsToHire's tool that writes your book with you chapter by chapter and delivers it ready for Amazon KDP, with the Codex of characters, places, and lore maintaining consistency from beginning to end. It's at https://aistohire.com/kdp-author-studio-create-books-amazon-kdp-ai-136 and creating an account is free.

Character entries and worldbuilding with AI: Your book's Codex