worldbuilder
AGENTS.md7 starsChanged 4 days agoApache-2.0View on GitHub
Guidance for coding agents (Antigravity, Claude Code, Codex) working on this repository. WorldBuilder is a multi-agent plugin (works natively in Antigravity, Claude Code / Cowork, and Codex) for building internally consistent fictional worlds. A world is a folder of Markdown files with YAML frontmatter. There is no database, no server, and no external runtime dependencies: the agent does the creative work guided by skills, and small stdlib-only Python scripts do the deterministic checking, compilation, readability analysis, and interactive visualisation. The…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 35,266 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository21 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- handoffSkill
- next-allSkill
- nextSkill
- retroSkill
- specSkill
- economy-and-tradeSkill
- folklore-and-traditionsSkill
- geography-and-climateSkill
- history-and-eventsSkill
- magic-systemsSkill
- peoplesSkill
- prose-checkSkill
- world-artSkill
- worldbuildingSkill
- world-compileSkill
- world-reviewSkill
- world-validateSkill
- world-visualiserSkill
- world-wizardSkill
- writingSkill
The file
We split this AGENTS.md into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 28
Keep plugin.json and .claude-plugin/plugin.json in sync.
- Distinctive: line 32
Never weaken or delete a test to make it pass.
- Very specific: line 58
Git & GitHub: always use agent-git and agent-gh on agent/<persona>/t-<N>-<slug> branches, label PRs agent-authored, and respect groundhog …
- Distinctive: line 59
Compact instructions: when compacting, keep ticket numbers and branches in flight, PR numbers, decisions and reasons, open questions for …
≈ “Common” is an estimate: at least 1 in 5 of the 45,344 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
Guidance for coding agents (Antigravity, Claude Code, Codex) working on this repository.
What this is
WorldBuilder is a multi-agent plugin (works natively in Antigravity, Claude Code / Cowork, and Codex) for building internally consistent fictional worlds. A world is a folder of Markdown files with YAML frontmatter. There is no database, no server, and no external runtime dependencies: the agent does the creative work guided by skills, and small stdlib-only Python scripts do the deterministic checking, compilation, readability analysis, and interactive visualisation.
The goal that outranks everything else is internal consistency: every significant fact has causes and consequences recorded in the files, relationships are reciprocal, and nothing contradicts the world flags.
Layout
plugin.jsonand.claude-plugin/plugin.json: plugin manifests (Antigravity native and Claude Code / Cowork). The repo root is the plugin root.mcp_config.jsonand.mcp.json: remote Streamable HTTP MCP configs for fal.ai OAuth (https://mcp.fal.ai/mcp-relay, no API key required).skills/: one folder per skill, each withSKILL.md(frontmatternameanddescriptiononly) and optionalreferences/,scripts/, andassets/.worldbuilding(core contract, routing table, magic gate),world-wizard,history-and-events,geography-and-climate,economy-and-trade,peoples,magic-systems,folklore-and-traditions,writing,world-review,world-validate,prose-check,world-compile,world-visualiser,world-art.skills/worldbuilding/assets/: entity templates and schemas, editor personas, andexample-the-lattice/, a complete worked example (magic off) that must always validate with 0 errors and 0 warnings.
skills/world-validate/scripts/validate.pyandgraph.py: the checker and graph layer (why,impact,path,unrooted,export).vendor/yaml/is a vendored pure-Python PyYAML.skills/world-compile/scripts/compile.py,skills/prose-check/scripts/readability.py,skills/writing/scripts/story_campaign.py: manuscript export, prose statistics, and dated short story / D&D 5e campaign brief generation.skills/world-visualiser/scripts/viz_data.pyandbuild_viewer.py: builds (or serves on localhost via--serve) a self-contained single-file HTML viewer (output/world-viewer.html, with optional--embed-media/--embed-images) featuring 7 views: 3D causal graph, timeline, cartographic map (procedural Topographic/Parchment terrain + optionalworld-map.pngbackdrop), trade, life, gallery (with artwork, looping soundtrack & character voice audio), and content reader (stories, 5e campaigns, chapters with clickable entity links).commands/: slash commands for Claude Code / Cowork (/wb-new,/wb-wizard,/wb-validate,/wb-review,/wb-write,/wb-story,/wb-campaign,/wb-compile,/wb-readability,/wb-visualise,/wb-art). Antigravity and Codex trigger the same workflows directly via the skills.tests/: pytest suite for all scripts.
Rules for changes
- Scripts are Python 3.9+, standard library plus the vendored YAML. Do not add runtime dependencies.
SKILL.mdfrontmatter has onlynameanddescription(withnamematching the folder name), valid YAML (no colon-space inside the description), and sandbox-safe: no!shell injection, no absolute paths, and no client-specific env vars like${CLAUDE_SKILL_DIR}— use relative paths from the skill directory. KeepSKILL.mdunder 300 lines and push detail intoreferences/.- Keep
plugin.jsonand.claude-plugin/plugin.jsonin sync. - A skill that needs the checker says "load
world-validateand use its scripts". - The magic yes/no flag (
world_flags.magic.present) gates every supernatural element in every skill and in the validator. Traditions may describe magic as a belief; they never cause real effects. - One canonical home for each rule or number; other skills point to it rather than restating it.
- Never weaken or delete a test to make it pass. Adding an entity to the example world legitimately changes counts: update them with a comment.
Verify
make verify
# Runs:
# uv run ruff check .
# uv run pytest -q
# python3 skills/world-validate/scripts/validate.py skills/worldbuilding/assets/example-the-latticeEntity model
Twelve types: character, location, faction, item, magic-system, arc, event, species, race, language, lineage, tradition. Cross-references are kebab-case slugs matching filenames. Dates use WorldDate (era prefix and year, optionally month and day) with eras defined in world/history/calendar.yaml. Events carry caused_by, leads_to, root_causes, consequences, and traces; traditions carry origin_events.
<!-- groundhog-agency:start -->Groundhog Agency Workflow (Vendor-Agnostic)
This repository uses groundhog-agency with Groundhog's agent-git / agent-gh broker. Works identically in Claude Code, Antigravity, and Codex:
- Skills:
/spec <idea>(grill → spec + tickets),/next [N](dispatch up to 3 tickets →implementer→ fresh-contextreviewer→ ship PR),/handoff(updateSTATUS.md≤40 lines → start fresh). - Roles: canonical contracts live in
.agents/roles/{implementer,reviewer,scout}.md(and.claude/agents/for Claude Code).- Claude Code: uses
.claude/agents/*.md,.claude/hooks/gtq.py, and.claude/settings.json. - Antigravity: delegates via
invoke_subagent(implementerinWorkspace: "share",reviewerread-only,scoutonflash/flash_lite). - Codex: runs in
workspace-writesandbox with isolated git worktrees per ticket.
- Claude Code: uses
- Git & GitHub: always use
agent-gitandagent-ghonagent/<persona>/t-<N>-<slug>branches, label PRsagent-authored, and respectgroundhog agent-git status(autonomousvshuman-review). Never push directly tomain/master. - Compact instructions: when compacting, keep ticket numbers and branches in flight, PR numbers, decisions and reasons, open questions for the maintainer, and the next action. Drop tool output, file contents, diffs, and anything already in an issue or
STATUS.md.
<!-- groundhog-agency:end -->Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

