Files
md-manuscript/templates/snowflake/{{ cookiecutter.project_name }}/03-Story-Bible
landon 229e2413c4 Add summary: to character templates; fix two bugs that were hiding it
Add a summary: field (with a short explanatory comment) to
01_character_template.md, and fill the field in on the two shipped
examples, 01_protagonist.md and 02_antagonist.md. Documented in the
Story Bible README's "Adding a New Character" example and its new
"Automatic Linking in the Draft" section, and in the main README's
Story Bible docs.

While wiring this up against the real bundled template rather than a
hand-written test fixture, found two bugs that were silently defeating
last session's auto-linking feature for every project made from that
template:

- extract_from_frontmatter() only read a title: field for an item's
  name, but every bundled Story Bible template — character, location,
  lore, object, all of them — writes name:, never title:. Every real
  item's display name (and therefore everything matched against it in
  prose) was falling back to a garbled, uncapitalized filename guess
  instead. Now name: is read (title: still works too, for a sheet that
  uses that word instead).

- build_editor_job()'s fast path skipped straight to an unformatted
  run whenever there were no grammar/spelling issues and no active
  search — without checking whether there was a Story Bible reference
  to highlight. A name with no spelling issue of its own (which is
  most of them) never got its purple background, and with it no visible
  way to find the hover card that depends on it.

Both were invisible in the unit tests added last session because they
exercised find_references() directly against a hand-built index, never
through StoryBibleIndex::build() against real files, and the manual
smoke test happened to use a name ("Bixby") that the spell checker
flagged anyway — which incidentally kept the fast path from short-
circuiting. Added a disk-built-index test and a fast-path regression
test so both stay caught.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-19 11:32:56 -05:00
..

Story Bible

Your single source of truth for all story world information.

The Story Bible is a comprehensive reference system that helps you maintain consistency, track connections, and ensure continuity across your entire narrative. Every fact about your story world should be documented here.


Structure Overview

03-Story-Bible/
├── _index.md                    # Master index and navigation
├── README.md                    # This file
├── CONSISTENCY.md               # Continuity tracking checklist
│
├── 01-Characters/               # All characters
│   ├── _index.md
│   ├── character_grid.md        # Quick reference table
│   └── main_characters/         # Protagonist, antagonist, etc.
│       ├── 01_character_template.md
│       ├── 01_protagonist.md
│       └── 02_antagonist.md
│   └── supporting_characters/    # Secondary characters
│   └── minor_characters/        # Background characters
│
├── 02-Locations/               # World geography
│   ├── _index.md
│   ├── regions/
│   │   └── 01_region_template.md
│   ├── cities/
│   │   └── 01_city_template.md
│   └── buildings/
│       └── 01_building_template.md
│
├── 03-Lore/                    # World-building
│   ├── _index.md
│   ├── history/
│   │   └── 01_history_template.md
│   ├── factions/
│   │   └── 01_faction_template.md
│   └── rules.md                 # Magic, tech, physics, society
│
├── 04-Objects/                 # Important items
│   ├── _index.md
│   ├── artifacts/
│   │   └── 01_artifact_template.md
│   └── weapons/
│       └── 01_weapon_template.md
│
├── 05-Relationships/            # Connections
│   ├── _index.md
│   └── character_relationships.md
│
├── 06-Timeline/                # Chronology
│   └── _index.md
│
└── 07-Themes/                  # Motifs and symbols
    └── _index.md

How to Use the Story Bible

1. Adding a New Character

  1. Copy the template:

    cp 01-Characters/main_characters/01_character_template.md 01-Characters/main_characters/03_new_character.md
    
  2. Fill in the YAML frontmatter first:

    ---
    id: unique_id
    name: Character Name
    summary: "One line the app can show in a hover card"
    slug: character-name
    type: protagonist|antagonist|ally|enemy|mentor
    status: active|draft|deceased|retired
    tags: [tag1, tag2]
    appearances: [chapter_1, chapter_5]
    related_characters: [character_a, character_b]
    ---
    
  3. Complete the character sheet with all known information

  4. Add to index files:

    • Update 01-Characters/_index.md
    • Update 01-Characters/character_grid.md
  5. Create cross-links from other relevant entries

2. Adding a New Location

  1. Choose the type: Region, City, or Building
  2. Copy the appropriate template
  3. Fill in details including relationships to characters
  4. Add to Locations index
  5. Link from character files that use this location

3. Adding Lore

  • Historical Events: Copy template from 03-Lore/history/
  • Factions: Copy template from 03-Lore/factions/
  • World Rules: Edit 03-Lore/rules.md

4. Maintaining Consistency

  • After each writing session: Update relevant Bible entries
  • Before finalizing a chapter: Run through CONSISTENCY.md checklist
  • Weekly review: Spend 15 minutes updating and verifying entries

Key Features

YAML Frontmatter

Every entry starts with YAML metadata for easy filtering and searching:

---
id: unique_identifier
name: Display Name
slug: url-friendly-name
type: category
tags: [tag1, tag2, tag3]
related_entities: [entity_a, entity_b]
status: active|draft|archived
created: "2024-01-01"
updated: "2024-01-01"
---

Use [[Link Text|file-name]] or [[file-name]] to create cross-references:

- **Current Owner:** [[John Doe]]
- **Location:** [[Castle Black]]
- **Related Event:** [[The War of Ashes|history/war_of_ashes]]

Automatic Linking in the Draft

The app does not require [[wiki-links]] to connect a draft to the Story Bible — a name written in ordinary prose ("Bixby stood at the door") is matched automatically against every entry's name: and aliases:, as long as it's spelled and capitalized the same way in both places. Hovering a matched name shows a card with the entry's summary: field and a link that opens the full sheet; [[wiki-links]] and @mentions still work too, and take priority if they ever land on the same word. A character sheet with no summary: still gets matched and links open fine — the card just says so and lets you add one.

Mermaid Diagrams

Create visual relationship maps and timelines:

```mermaid
graph LR
    A[John] -->|Brother| B[James]
    A -->|Mentor| C[Robert]
```

Tables

Use tables for structured data:

| Attribute | Value |
|-----------|-------|
| Age | 30 |
| Gender | Male |

Best Practices

1. Start Simple

  • Begin with basic information
  • Add details as they become relevant
  • Don't over-document early drafts

2. Stay Current

  • Update entries immediately after writing scenes
  • Don't let the Bible fall behind
  • Small updates are easier than big ones
  • Link characters to locations
  • Link locations to events
  • Link events to lore
  • This creates a web of knowledge

4. Tag Everything

  • Use consistent tags
  • Filter by tags when searching
  • Examples: #protagonist, #capital, #magic, #war

5. Review Regularly

  • Weekly: Quick scan for obvious issues
  • Monthly: Deep consistency check
  • Before publishing: Full verification

Search Tips

Use your editor's search feature:

Search Term Finds
[[ All cross-references
id: All YAML IDs
status: All status fields
tags: All tag lists
#tagname All entries with that tag

Tag Reference

Character Tags

#protagonist #antagonist #ally #enemy #mentor #romantic #family #deceased #noble #commoner #warrior #mage #thief

Location Tags

#capital #city #village #fortress #tavern #temple #ruins #wilderness #underground #floating #magical

Lore Tags

#magic #technology #war #religion #politics #history #myth #legend #prophecy #culture

Object Tags

#legendary #cursed #blessed #sentient #destroyed #lost #stolen #royal #sacred #ancient


Tools Integration

If your editor supports it:

  • Obsidian: Native backlink support, graph view, tag search
  • VS Code: Extensions for markdown preview and search
  • Typora: Clean preview with YAML support
  • Any editor: Basic search and replace works everywhere

Example Workflow

  1. Write Chapter 5 where John visits Castle Black
  2. Update John's entry: Add Castle Black to related_locations
  3. Update Castle Black entry: Add John to residents or visitors
  4. Update Timeline: Add "John visits Castle Black" event
  5. Check Consistency: Verify travel time and castle description match
  6. Cross-link: Ensure both entries link to each other

Need Help?

  • Check _index.md files for navigation
  • Use CONSISTENCY.md for verification
  • Look at existing entries for examples
  • Refer to templates for required fields

Remember: The Story Bible is a living document. Update it as you write, and it will save you hours of continuity fixing later.