Story Index relationships
Every relationship between two Story Index entries, Tom and Mary, the protagonist and the mentor, the rival factions, can be modeled as a typed edge with a description. Pendraic uses these relationships to inject relational context into AI prompts whenever the related entries appear in a scene.
Edge shape
Each relationship row carries:
- from_entry_id, to_entry_id, the two connected entries.
- type_key, free-form string the writer picks (married_to, mentored_by, betrayed, allied_with, rival_of, parent_of, etc.). Renders as the verb in the injected line.
- strength, 0..1. Reserved for future ranking; not currently surfaced in prompts.
- description, the load-bearing field. The history, the context, the unresolved thing. This is what the AI sees.
- bidirectional, boolean. When true, Pendraic deduplicates the edge so an A↔B relationship doesn't inject twice.
What gets injected
The variable token {{relationships_in_scene}} renders as a deduplicated bullet block:
- Tom married to Mary: Mary died giving birth to their first child; Tom carries subtle scars to this day. - Tom mentored by Eleanor: Eleanor taught him the trade and is now his nemesis after the betrayal at Glenravensford.
Only relationships involving entries actually present in the scene's prose are included. The dedup contract is strict: each edge appears once regardless of how many times the names show up in the text.
When an entry isn't in the scene
If Tom is in the scene and Mary isn't, the Tom→Mary edge still injects (the relationship belongs to Tom too), but Mary's name has to come from somewhere. The substituter does one follow-up read for the missing-side names so the rendered block always shows real names instead of "(unknown)" placeholders.
World relationships
The same shape applies to World Index entries via {{world_relationships_in_scene}}. Use it for inter-faction conflicts, geographical adjacencies, magical-system dependencies, etc.
Where to manage them
Story relationships are managed from each entry's detail dialog (open the entry, scroll to the Relationships section). World relationships live in the World Builder's entry editor, they need the deeper surface because they often carry typed roles tied to the world's magic / political / kinship systems.

