--- description: Update cross-reference links in generated files allowed-tools: Edit(40 - Generated/**), MultiEdit(40 - Generated/**) --- You are maintaining cross-reference links across all generated writer's cards. **OBJECTIVE**: Scan all files in `40 - Generated/` and `00 - Manuscript/` to create a comprehensive cross-referencing system with proper wiki-style links. ## Process: 1. **Inventory all generated files** in `40 - Generated/*/` subdirectories 2. **Identify all entities** (characters, locations, ships, technology, species, plotlines, themes, conflicts, events) 3. **Update each generated card** to include proper wiki-style links to related entities IMPORTANT: DO NOT UPDATE MANUSCRIPT CHAPTERS OR WORLD BIBLE FILES. Only files inside `40 - Generated/` should be edited, though _destinations_ can be outside that. ## Link Rules: ### Wiki-Style Linking Format: - Use `[[filename.md|Display Name]]` for first mentions - Use `[[filename.md]]` for subsequent mentions if the filename matches the display name - Always use the actual filename, not aliases ### What to Link: - **Characters** → Link to other characters, locations, ships, events, conflicts they're involved in - **Locations** → Link to characters present, events that occurred there, related locations - **Ships** → Link to crew members, captains, locations visited, events involving the ship - **Technology** → Link to users, related tech, events where it's significant - **Species** → Link to known individuals, their technology, locations they inhabit - **Plotlines** → Link to key characters, events, conflicts, themes they explore - **Themes** → Link to characters who embody them, events that illustrate them - **Conflicts** → Link to participants, locations where they occur, events that escalate them - **Events** → Link to participants, locations, ships present, technologies used ### Link Placement: - **Frontmatter lists**: Use links in YAML values and arrays where appropriate - **First mentions**: Always link the first time an entity is mentioned in content - **Section headers**: Don't link section headers themselves - **Context-appropriate**: Only link when the connection adds value ## File Processing: For EACH file in `40 - Generated/`: 1. **Read the current content** 2. **Identify missing or broken links** 3. **Add appropriate wiki-style links** for: - Names in frontmatter (appearances, relationships, characters_involved, etc.) - First mentions of entities in the content - Related entities in dedicated relationship sections 4. **Fix broken links** where files have been renamed or moved 5. **Remove links to non-existent files** ## Cross-Reference Opportunities: ### High-Value Links to Add: - Character relationships and family connections - Location hierarchies (rooms within ships, planets within systems) - Technology dependencies and related systems - Species and their known individuals - Events and their participants/locations - Plotlines and the characters/events that drive them - Conflicts and all involved parties - Themes and the characters/events that explore them ### Frontmatter Link Fields: Update these frontmatter fields with proper links: - `appearances: [chapter, files]` - `characters_involved: [character, files]` - `relationships: [character, files]` - `related_plotlines: [plotline, files]` - `locations: [location, files]` - `crew: [character, files]` - `known_individuals: [character, files]` - And similar relationship fields ## Quality Requirements: - **Only link to files that actually exist** - **Use consistent display names** (match the entity's canonical name) - **Don't over-link** - first mention and contextually important references only - **Preserve existing content** - only add links, don't change the prose - **Maintain proper formatting** - don't break existing markdown structure ## Output: Update each file with improved cross-referencing, ensuring the entire `40 - Generated/` collection becomes a well-linked knowledge graph for the Universalis story world. **IMPORTANT**: Always verify file existence before creating links. Use the actual filenames from the filesystem, not assumed names.