Query the world using natural language. Find entities, resolve temporal states, explore relationships, and search semantically.
Query the world using natural language. Translates user questions into wb.py commands and presents results clearly.
WB="_meta/.wb-venv/Scripts/python .claude/skills/world-builder/_lib/wb.py"
On non-Windows systems, use _meta/.wb-venv/bin/python instead.
Detect the vault root (the directory containing _meta/).
Analyze the user's question (from $ARGUMENTS or conversation) and determine which query type to use:
For questions about entity types, names, tags, or text content.
| User asks | Command |
|---|---|
| "List all factions" | $WB query --type faction |
| "Find people tagged noble" |
$WB query --type person --tags noble |
| "Who is Kael?" | $WB query --name Kael |
| "Places in the Northern Wastes" | $WB query --type place --within "Northern Wastes" |
| "Anything about dragons" | $WB query --text dragons |
For questions about state at a specific time.
| User asks | Command |
|---|---|
| "Who ruled Valdris in SA:200?" | $WB resolve "Valdris" --at "SA:200" |
| "What was the Iron Covenant doing in year 500?" | $WB resolve "Iron Covenant" --at "500" |
| "Show the timeline of Kael" | $WB resolve "Kael" --at "<current_era_end>" (gets full timeline) |
Can also combine with structured query: $WB query --type person --at "SA:200" resolves temporal state for all results.
For questions about connections between entities.
| User asks | Command |
|---|---|
| "Who is related to Kael?" | $WB query --related-to "Kael" |
| "Show the extended network of the Iron Covenant" | $WB query --related-to "Iron Covenant" --hops 2 |
| "What connects A to B?" | Run --related-to A --hops 3, look for B in results |
For questions about geographic containment and hierarchy.
| User asks | Command |
|---|---|
| "What's inside the Northern Wastes?" | $WB spatial "Northern Wastes" |
| "Where is Valdris located?" | $WB spatial "Valdris" (check containment_chain) |
For fuzzy/conceptual questions where exact terms are unknown.
| User asks | Command |
|---|---|
| "Who would betray their allies?" | $WB query --semantic "betrayal treachery ambitious" |
| "Places with dark magic" | $WB query --semantic "dark magic corruption" --type place |
Read $ARGUMENTS or the user's natural language question. Identify:
Run the appropriate $WB commands via Bash. Always use --vault <vault_root> and --pretty for readability.
For complex questions, chain multiple queries:
For each result, consider reading the full entity file with the Read tool if the user needs detail beyond what the query returns (which is metadata only).
Present results in a clear, readable format:
After presenting results, suggest 2-3 follow-up queries the user might find useful. Examples:
/wb-query related to [Entity]"/wb-query [Entity] at SA:300"/wb-query connections of [Entity] within 3 hops"Each flag maps to a specific store:
--name, --type, --tags, --within -> SQLite. Fastest path to known entities and structured filters.--related-to, --hops -> Graph. Path-finding and neighbor traversal.--semantic -> Vector (OpenAI text-embedding-3-large with hierarchical chunking). Best for thematic, creative, cross-type, and section-precision queries.resolve --at -> SQLite. Timeline data lives in frontmatter, indexed in SQLite.spatial -> Graph. Parent/child containment is a graph operation.--semantic first, then --related-to on the top results.--text flag does full-text search across all content, useful when you are not sure which field contains the answer./wb-create or /wb-suggest — do not fill the gap yourself.