Create bidirectional wikilinks between existing entities. Use when user wants to "connect", "link", or "relate" two or more entities, or when they mention entities should reference each other.
Link entities: $ARGUMENTS
Creates bidirectional wikilinks between entities to ensure proper interconnection. Can operate in:
[entity1] [entity2] → Manual linking between two entitiesauto [world name] → Auto-detect and suggest missing links for a world[entity1] to [entity2] → Manual with explicit relationship[entity] alone → Show what this entity could connect toWorlds/ for each entity nameBased on entity types, suggest appropriate relationship:
| Entity A | Entity B | A Links to B As | B Links to A As |
|---|---|---|---|
| Character | Settlement | Location/Home | Notable NPCs/Residents |
| Character | Organization | Member Of | Members |
| Character | Character | Ally/Rival/Family | Ally/Rival/Family |
| Settlement | Region | Part Of | Contains/Settlements |
| Settlement | Organization | Hosts | Headquarters/Presence |
| Organization | Organization | Allied With/Rivals | Allied With/Rivals |
| Geography | Geography | Part Of/Borders | Contains/Borders |
| Character | Deity | Worships | Followers |
| Item | Character | Owned By | Equipment/Possessions |
| Creature | Geography | Habitat | Native Creatures |
| Event | Location | Occurred At | Historical Events |
Ask user to confirm or specify the relationship:
"I'll link [[Entity A]] and [[Entity B]]. Suggested relationship:
- A references B as: [suggested category]
- B references A as: [suggested category]
Is this correct, or would you prefer a different relationship?"
Read Entity A:
Add Link to Entity A:
[[Entity B]]Read Entity B:
Add Link to Entity B:
[[Entity A]]=== LINKS CREATED ===
[[Entity A]] → [[Entity B]]
Added to: Connections > [Category]
[[Entity B]] → [[Entity A]]
Added to: Connections > [Category]
Both entities now reference each other.
Worlds/[World Name]/[[wikilinks]] in content[[wikilinks]] in Connections sectionCreate adjacency list:
Entity A → [Entity B, Entity C, ...]
Entity B → [Entity D, ...]
...
Check for:
=== CONNECTION ANALYSIS: [World Name] ===
One-Way Links Found: X
Suggested New Links: Y
Orphan Entities: Z
HIGH PRIORITY (One-Way Links):
1. [[Character A]] → [[City B]] but City B doesn't link back
Suggestion: Add Character A to City B's "Notable NPCs"
2. [[Organization X]] → [[Settlement Y]] but Settlement Y doesn't link back
Suggestion: Add Organization X to Settlement Y's "Organizations"
SUGGESTED CONNECTIONS:
3. [[Character C]] and [[Character D]] are both in [[Organization Z]]
Suggestion: Link them as "Associates" or "Fellow Members"
4. [[Settlement E]] and [[Settlement F]] are both in [[Region G]]
Suggestion: Link them as "Nearby Settlements"
ORPHAN ENTITIES (no incoming links):
- [[Forgotten NPC]] - Consider linking from their location
- [[Lonely Mountain]] - Consider linking from parent region
Would you like me to:
1. Fix all one-way links automatically
2. Add all suggested connections
3. Review each suggestion individually
4. Just fix specific items (enter numbers)
For each approved fix:
=== LINKING COMPLETE ===
Changes Made:
- Fixed X one-way links
- Added Y new bidirectional connections
- Orphans addressed: Z
Entities Modified: [list]
Connection Density:
- Before: Average X.X links per entity
- After: Average Y.Y links per entity
Remaining Issues:
- [List any unresolved items]
When adding to Connections section, use these formats:
## Connections
### People
- **Allies:** [[Ally 1]], [[Ally 2]]
- **Rivals:** [[Rival 1]]
- **Family:** [[Family Member]]
### Organizations
- **Member Of:** [[Organization]]
- **Enemies:** [[Enemy Org]]
### Locations
- **Home:** [[Settlement]]
- **Frequents:** [[Tavern]], [[Shop]]
## Connections
### Geography
- **Region:** [[Parent Region]]
- **Nearby:** [[Nearby Settlement]]
### People
- **Ruler:** [[Ruler Name]]
- **Notable NPCs:** [[NPC 1]], [[NPC 2]]
### Organizations
- **Based Here:** [[Org 1]], [[Org 2]]
- **Influence:** [[Distant Org]]
## Connections
### Structure
- **Headquarters:** [[Settlement]]
- **Branches:** [[Location 1]], [[Location 2]]
### People
- **Leader:** [[Leader Name]]
- **Notable Members:** [[Member 1]], [[Member 2]]
### Relationships
- **Allies:** [[Allied Org]]
- **Rivals:** [[Rival Org]]
# Link two specific entities
/link-entities "Grom the Blacksmith" "Ironhold City"
# Auto-detect missing links
/link-entities auto Eldoria
# Show potential connections for one entity
/link-entities "The Iron Guild"