agentleFS
gofastercloudgofastercloud/worldbuilder/skills/world-validate/SKILL.md

world-validate

Skill7 starsChanged 4 days agoApache-2.0View on GitHub

Check a worldbuilding project for contradictions and broken links, then fix them. Use after adding or changing any world content, before declaring worldbuilding work finished, or when the user asks whether their world is consistent. Covers dangling references, one-way relationships, timeline and lifespan errors, world-flag violations, causal-chain problems such as effects that precede their causes, and traditions (myths, customs, taboos) that do not trace back to a real event.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 2 are distinctive, and 3 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.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run the checker, read its findings, fix the real problems, rerun.

    line 8
  2. Very specific:

    Run scripts/validate.py (resolved relative to this skill's directory):

    line 12
  3. Very specific:

    If python3 is missing or the script cannot run, tell the user, then do the checks by hand by reading the files, using the list below, and …

    line 20
  4. Very specific:

    Add --json to any command for machine-readable output.

    line 37
  5. Distinctive:

    Never edit the checker or its tests to make a world pass.

    line 82

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

World validation

Run the checker, read its findings, fix the real problems, rerun.

Run

Run scripts/validate.py (resolved relative to this skill's directory):

python3 <this-skill-dir>/scripts/validate.py <project-dir>

Options: --json for machine-readable output, --severity error to hide warnings. Exit code 1 means at least one error. The script needs only Python 3.9+; PyYAML is bundled.

If python3 is missing or the script cannot run, tell the user, then do the checks by hand by reading the files, using the list below, and say the check was manual.

Tracing causes and consequences

graph.py (scripts/graph.py) builds the world as a graph (entities as nodes, typed links as edges):

python3 <this-skill-dir>/scripts/graph.py <project-dir> <command> [args]
  • why <slug>: the full upstream causal ancestry of an event, down to its root causes. Use it to check an event really is explained. For a tradition it lists the origin events first (marked [memory link: origin of tradition], since a tradition is remembered from an event, not caused by it) and then each event's causal ancestry.
  • impact <slug> [--depth N]: everything downstream of an entity or event, causal effects first, then places, members and routes that depend on it. For an event it also lists Traces in the present: the traditions and other entities it left behind, with their status. Run it before changing an established fact, and update every entity it lists.
  • path <a> <b>, neighbors <slug>: how two things connect.
  • unrooted: events with no causal ancestry and no root_causes, traditions with no origin event, and entities with no links.
  • stats: counts, connected components and causal depth.
  • export --out graph.json: the whole graph as JSON for visualisation. Edges of kind leaves-trace run from an event to each tradition or entity in its traces (and to each tradition naming it in origin_events), one edge per pair.

Add --json to any command for machine-readable output.

What it checks

Errors:

  • unparseable or unclosed frontmatter; a file that cannot be read
  • missing targets for character relationships, chapter POV and event participants, and causal links (caused_by, leads_to) that point at a non-event
  • a race whose species is missing or not a species; intelligibility scores outside 0 to 1
  • circular location hierarchies; river hydrology.flows_to cycles
  • characters acting before birth or after death, birth after death
  • a parent under 16 years older than the child; a faction leader who is not a character, or is dead
  • broken family, species/race and lineage links (one side lists the other, the other does not list back)
  • a character's race belonging to a different species; birth events with parents of different species when cross-species breeding is off or undefined
  • content that contradicts a world flag: technology transport (train, car, spaceship...), magical transport (teleportation, ley-line, portal, magic carpet...) when world_flags.magic.present is false, magic systems or references to them when magic is absent
  • causes dated later than their effects, or in a cycle; an end date before a start date
  • a tradition whose origin_events names a missing event or a non-event; a tradition whose first_attested is earlier than its earliest origin event (tradition-before-origin)

Warnings:

  • a missing faction, location, parent location, route destination, organisation, location or item on an event, or any other reference not listed above
  • relationships, faction membership, notable characters, routes and allies that are not reciprocated
  • events with no cause, effect or consequences recorded; significant events (important, crucial, world-changing; legacy major and critical are tolerated) with no cause or no effect (a non-empty traces or a valid open_ended counts as an effect)
  • a tradition with neither origin_events nor origin_unknown (orphan-tradition); a purely oral tradition marked fidelity: accurate 300 or more years after its earliest origin event, when the present date (present_date or current_date in project.yaml or calendar.yaml) is known (implausible-fidelity)
  • an event traces entry or a tradition origin_events entry that the other side does not reciprocate; contradicts that is not mutual; missing held_by, regions, places, language, related or traces targets
  • entities used before they existed or after they ended; a death event for a character not marked dead
  • an event era prefix that world/history/calendar.yaml does not define (only when the calendar lists eras)
  • flows_to pointing uphill when both places have elevation_m; unresolved flows_to, climate_profile and flora/fauna species references (plain name: entries are fine)
  • magic words in any frontmatter text field (not the Markdown body, and not traditions, which record beliefs rather than facts about the world) when magic is absent, unless listed in world_flags.magic.exceptions or its notes; incomplete magic systems when magic is present; technology words in chapter prose when the flag is false; a faction with no leader or whose leader is not a member

How other skills call this

Other skills say "load world-validate and use its scripts". Resolve <this-skill-dir> to the directory containing this SKILL.md file (so the commands work from any working directory in Antigravity, Claude, or Codex):

python3 <this-skill-dir>/scripts/validate.py <project-dir>
python3 <this-skill-dir>/scripts/graph.py <project-dir> why <event-slug>
python3 <this-skill-dir>/scripts/graph.py <project-dir> impact <slug>

Fixing findings

  1. Group findings by entity and read each file named.
  2. Decide the cause. A missing reverse link is usually a one-line edit. A date conflict needs a judgement: change the date, change the link, or remove it. Tell the user which you chose and why when a fix changes established facts.
  3. For warnings about missing causes or consequences, use the worldbuilding skill: work out what really caused or followed the event and record it in the affected files. Do not write filler to silence a warning.
  4. Rerun until no errors remain. Report remaining warnings honestly, with the reason for any left unresolved.

Never edit the checker or its tests to make a world pass.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.