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
$ARGUMENTS for 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
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
1---2name: expand-entity3description: Expand an existing entity with additional detail, create related sub-entities, or generate deeper connections. Use when user wants to "flesh out", "expand", "add more detail to", or "develop" an existing entity like a city, character, or organization.4---56# Expand Entity78Expand this entity: $ARGUMENTS910## Overview1112Takes an existing worldbuilding entity and expands it by:131. Adding richer detail to existing sections142. Creating related sub-entities (NPCs for a city, lieutenants for a villain, etc.)153. Generating deeper connections to other existing entities164. Filling in image prompts if empty1718## Instructions1920### Step 1: Locate the Entity21221. Parse `$ARGUMENTS` for entity name or path232. If path provided, read directly243. If name provided, search in `Worlds/` directories:25 - Try exact match first26 - Then fuzzy match on filename and YAML `name:` field274. If not found or ambiguous, list matches and ask user to clarify2829### Step 2: Analyze Current State3031Read the entity and assess:32331. **Section Completeness:**34 - Which sections are minimal (1-2 sentences)?35 - Which sections are empty?36 - Are image prompts filled?37382. **Connection Density:**39 - Count `[[wikilinks]]` in Connections section40 - Target: 5-8 connections minimum41 - Identify categories with no connections42433. **Related Entities:**44 - What related entities SHOULD exist but don't?45 - What sub-entities make sense (tavern in city, lieutenant for villain)?46474. **Cross-Reference Check:**48 - Do entities this one links to link back?4950### Step 3: Present Expansion Options5152Show the user what can be expanded:5354```55=== EXPANSION OPTIONS: [Entity Name] ===5657Current State:58- Sections: X/Y filled (Z minimal)59- Connections: X wikilinks60- Image Prompts: [Filled/Empty]6162Recommended Expansions:63641. DEEPEN DETAIL65 - [Section A] - Currently 2 sentences, could expand to full paragraph66 - [Section B] - Empty, needs content67 - History section needs more specific events68692. CREATE SUB-ENTITIES70 - [Tavern] - The city needs a memorable inn71 - [Shop] - A notable merchant establishment72 - [NPC] - The mentioned "captain of the guard" deserves their own file73743. ADD CONNECTIONS75 - No connection to nearby [Region X]76 - Should link to [Organization Y] mentioned in text77 - Missing reciprocal link from [Entity Z]78794. FILL IMAGE PROMPTS80 - Portrait prompt is empty81 - Scene prompt needs entity-specific details8283Which would you like to do? (1-4, or 'all', or describe specific needs)84```8586### Step 4: Execute Expansion8788#### 4A: Deepen Detail8990For each section to expand:911. Read current content922. Generate 2-3x more detail maintaining consistency933. Add specific names, numbers, sensory details944. Show preview before applying955. Use Edit tool to update section9697**Section Expansion Targets:**98| Section Type | Minimum | Target |99|--------------|---------|--------|100| Overview | 3 sentences | 5-7 sentences |101| Personality | 2-3 traits | 4-5 traits with examples |102| History | 1 event | 3-4 key moments |103| Description | Brief | Full sensory details |104105#### 4B: Create Sub-Entities106107Based on entity type, offer relevant sub-entities:108109**For Settlements (City/Town):**110- Tavern(s) - at least 1 per settlement111- Shop(s) - 2-3 notable merchants112- Temple - if deities exist in world113- Notable NPCs - leaders, quest-givers114- District details - if city115116**For Characters (Antagonist/Protagonist):**117- Lieutenants/Allies - supporting characters118- Familiar - if magic user119- Signature Items - weapons, artifacts120- Lair/Headquarters - if villain121122**For Organizations:**123- Leadership NPCs124- Headquarters settlement details125- Signature items/artifacts126- Rival organizations127128**For Geography (Region):**129- Settlements within130- Geographic features131- Notable creatures132- Adventure sites133134For each sub-entity:1351. Read appropriate template1362. Generate content linked to parent entity1373. Show preview, get approval1384. Save to appropriate folder1395. Update parent entity with link to new sub-entity140141#### 4C: Add Connections1421431. **Scan World:**144 - Read World Overview for major entities145 - Scan entity's category folder146 - Scan related category folders1471482. **Identify Logical Connections:**149 - Geographic proximity150 - Organizational membership151 - Historical involvement152 - Trade/political relationships1531543. **Add Bidirectional Links:**155 - Update current entity's Connections section156 - Update each connected entity to link back157158**Connection Categories by Entity Type:**159| Entity Type | Connection Categories |160|-------------|----------------------|161| Character | Allies, Rivals, Organizations, Locations |162| Settlement | Region, Government, Organizations, Notable NPCs |163| Organization | Headquarters, Members, Allies, Rivals |164| Geography | Contains, Borders, Notable Locations |165166#### 4D: Fill Image Prompts1671681. Read entity content thoroughly1692. Extract key visual details:170 - Physical appearance171 - Setting/environment172 - Mood/atmosphere173 - Distinctive features1743. Generate specific prompts using template format:175 ```176 **Prompt:** [Art style from template], [specific subject], [key details], [setting], [mood/lighting], [notable features]177 ```1784. Update both prompt sections179180### Step 5: Update World Overview181182If significant content was added:1831. Read `World Overview.md`1842. Check if entity is referenced in Quick Reference1853. Add if missing and entity is significant1864. Update relevant category sections187188### Step 6: Summary Report189190```191=== EXPANSION COMPLETE: [Entity Name] ===192193Changes Made:194- Expanded [X] sections with additional detail195- Created [Y] new sub-entities:196 - [[Sub-Entity 1]] (Type)197 - [[Sub-Entity 2]] (Type)198- Added [Z] new connections199- Filled [N] image prompts200201Connection Density: [Before] → [After] wikilinks202203New Related Entities:204- [[Entity 1]] - [brief description]205- [[Entity 2]] - [brief description]206207Suggested Next Steps:208- Expand [[Related Entity]] for consistency209- Create encounter at this location210- Generate images with /generate-image211```212213### Step 7: Offer Follow-up214215After expansion:216> "Would you like me to:217> 1. Expand another entity218> 2. Generate an image for this entity219> 3. Create an encounter set here220> 4. Audit connections with /audit-world"221222## Expansion Quality Guidelines2232241. **Maintain Voice:** Match the existing tone and style2252. **Be Specific:** Use names, numbers, concrete details2263. **Connect Everything:** New content should reference existing entities2274. **Avoid Contradiction:** Don't contradict established facts2285. **Add Plot Hooks:** Include adventure opportunities2296. **Fill Gaps:** Address any logical gaps (ruler without advisors, etc.)230231## Examples232233```234# Expand a city235/expand-entity Ironhold City236237# Expand by path238/expand-entity Worlds/Eldoria/Characters/Grom the Blacksmith.md239240# Expand with specific focus241/expand-entity "Ironhold City" --focus npcs242```