expand-entity
Expand Entity
Expand this entity: $ARGUMENTS
Overview
Takes an existing worldbuilding entity and expands it by:
- Adding richer detail to existing sections
- Creating related sub-entities (NPCs for a city, lieutenants for a villain, etc.)
- Generating deeper connections to other existing entities
- Filling in image prompts if empty
Instructions
Step 1: Locate the Entity
- Parse
$ARGUMENTSfor entity name or path - If path provided, read directly
- If name provided, search in
Worlds/directories:- Try exact match first
- Then fuzzy match on filename and YAML
name:field
- If not found or ambiguous, list matches and ask user to clarify
Step 2: Analyze Current State
Read the entity and assess:
-
Section Completeness:
- Which sections are minimal (1-2 sentences)?
- Which sections are empty?
- Are image prompts filled?
-
Connection Density:
- Count
[[wikilinks]]in Connections section - Target: 5-8 connections minimum
- Identify categories with no connections
- Count
-
Related Entities:
- What related entities SHOULD exist but don't?
- What sub-entities make sense (tavern in city, lieutenant for villain)?
-
Cross-Reference Check:
- Do entities this one links to link back?
Step 3: Present Expansion Options
Show the user what can be expanded:
=== EXPANSION OPTIONS: [Entity Name] ===
Current State:
- Sections: X/Y filled (Z minimal)
- Connections: X wikilinks
- Image Prompts: [Filled/Empty]
Recommended Expansions:
1. DEEPEN DETAIL
- [Section A] - Currently 2 sentences, could expand to full paragraph
- [Section B] - Empty, needs content
- History section needs more specific events
2. CREATE SUB-ENTITIES
- [Tavern] - The city needs a memorable inn
- [Shop] - A notable merchant establishment
- [NPC] - The mentioned "captain of the guard" deserves their own file
3. ADD CONNECTIONS
- No connection to nearby [Region X]
- Should link to [Organization Y] mentioned in text
- Missing reciprocal link from [Entity Z]
4. FILL IMAGE PROMPTS
- Portrait prompt is empty
- Scene prompt needs entity-specific details
Which would you like to do? (1-4, or 'all', or describe specific needs)
Step 4: Execute Expansion
4A: Deepen Detail
For each section to expand:
- Read current content
- Generate 2-3x more detail maintaining consistency
- Add specific names, numbers, sensory details
- Show preview before applying
- Use Edit tool to update section
Section Expansion Targets:
| Section Type | Minimum | Target |
|---|---|---|
| Overview | 3 sentences | 5-7 sentences |
| Personality | 2-3 traits | 4-5 traits with examples |
| History | 1 event | 3-4 key moments |
| Description | Brief | Full sensory details |
4B: Create Sub-Entities
Based on entity type, offer relevant sub-entities:
For Settlements (City/Town):
- Tavern(s) - at least 1 per settlement
- Shop(s) - 2-3 notable merchants
- Temple - if deities exist in world
- Notable NPCs - leaders, quest-givers
- District details - if city
For Characters (Antagonist/Protagonist):
- Lieutenants/Allies - supporting characters
- Familiar - if magic user
- Signature Items - weapons, artifacts
- Lair/Headquarters - if villain
For Organizations:
- Leadership NPCs
- Headquarters settlement details
- Signature items/artifacts
- Rival organizations
For Geography (Region):
- Settlements within
- Geographic features
- Notable creatures
- Adventure sites
For each sub-entity:
- Read appropriate template
- Generate content linked to parent entity
- Show preview, get approval
- Save to appropriate folder
- Update parent entity with link to new sub-entity
4C: Add Connections
-
Scan World:
- Read World Overview for major entities
- Scan entity's category folder
- Scan related category folders
-
Identify Logical Connections:
- Geographic proximity
- Organizational membership
- Historical involvement
- Trade/political relationships
-
Add Bidirectional Links:
- Update current entity's Connections section
- Update each connected entity to link back
Connection Categories by Entity Type:
| Entity Type | Connection Categories |
|---|---|
| Character | Allies, Rivals, Organizations, Locations |
| Settlement | Region, Government, Organizations, Notable NPCs |
| Organization | Headquarters, Members, Allies, Rivals |
| Geography | Contains, Borders, Notable Locations |
4D: Fill Image Prompts
- Read entity content thoroughly
- Extract key visual details:
- Physical appearance
- Setting/environment
- Mood/atmosphere
- Distinctive features
- Generate specific prompts using template format:
**Prompt:** [Art style from template], [specific subject], [key details], [setting], [mood/lighting], [notable features] - Update both prompt sections
Step 5: Update World Overview
If significant content was added:
- Read
World Overview.md - Check if entity is referenced in Quick Reference
- Add if missing and entity is significant
- Update relevant category sections
Step 6: Summary Report
=== EXPANSION COMPLETE: [Entity Name] ===
Changes Made:
- Expanded [X] sections with additional detail
- Created [Y] new sub-entities:
- [[Sub-Entity 1]] (Type)
- [[Sub-Entity 2]] (Type)
- Added [Z] new connections
- Filled [N] image prompts
Connection Density: [Before] → [After] wikilinks
New Related Entities:
- [[Entity 1]] - [brief description]
- [[Entity 2]] - [brief description]
Suggested Next Steps:
- Expand [[Related Entity]] for consistency
- Create encounter at this location
- Generate images with /generate-image
Step 7: Offer Follow-up
After expansion:
"Would you like me to:
- Expand another entity
- Generate an image for this entity
- Create an encounter set here
- Audit connections with /audit-world"
Expansion Quality Guidelines
- Maintain Voice: Match the existing tone and style
- Be Specific: Use names, numbers, concrete details
- Connect Everything: New content should reference existing entities
- Avoid Contradiction: Don't contradict established facts
- Add Plot Hooks: Include adventure opportunities
- Fill Gaps: Address any logical gaps (ruler without advisors, etc.)
Examples
# Expand a city
/expand-entity Ironhold City
# Expand by path
/expand-entity Worlds/Eldoria/Characters/Grom the Blacksmith.md
# Expand with specific focus
/expand-entity "Ironhold City" --focus npcs
More from hopeoverture/worldbuilding-system
create-world
Create a new worldbuilding project with full folder structure. Use when the user wants to start a new world, campaign setting, or fantasy setting like "create a world called Eldoria".
3generate-world
Generate an entire world with interconnected entities. Creates 80-120 entities including continents, regions, settlements, NPCs, organizations, history, and more. Use when the user wants a complete world generated automatically.
3validate-template
Validate a template or entity file has all required sections, YAML fields, and follows the worldbuilding system conventions. Use when creating new templates or checking if entities are properly structured.
3create-template
Create a new worldbuilding template for the Obsidian vault. Use when the user wants to add a new entity type template like "tavern template", "spell template", or "dungeon template".
2populate-entity
Scan an entity file to identify mentions of people, places, organizations, and other entities in the text. Creates missing entities using appropriate templates and adds wikilinks. Use when user wants to "populate", "fill out", "create linked entities", or "auto-generate connections" for an entity.
2random-encounter
Generate random encounters appropriate for a location, party level, or situation. Creates combat, social, or exploration encounters using existing world entities. Use when user wants "random encounter", "encounter table", or "what happens at [location]".
2