feat(worldgraph): add atlas graph metadata skeleton - #191
Merged
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (5)
Cache: Disabled due to Reviews > Disable Cache setting 📝 WalkthroughWalkthroughThis PR adds a world-graph metadata layer: new Pydantic node/edge/container models stored on Campaign, seeding that validates and attaches optional world_graph from world.json (filtering non-canonical entries), and viewer projection helpers that merge node/edge metadata into atlas locations, edges, and travel options without enabling new movement. ChangesWorld Graph Metadata Enrichment
Sequence Diagram(s)sequenceDiagram
participant World as world.json
participant Seed as seed_world()
participant Validate as _seed_world_graph()
participant Campaign as Campaign
World->>Seed: world dict
Seed->>Validate: (campaign, world)
Validate->>Validate: validate/construct WorldGraph, filter nodes
Validate->>Validate: validate/construct edges, filter non-canonical
Validate->>Campaign: attach validated WorldGraph to campaign.world_graph
sequenceDiagram
participant Snapshot as snapshot
participant Build as build_atlas_surface()
participant Locations as _atlas_known_locations()
participant Edges as _atlas_edges()
participant Travel as _atlas_travel_options()
participant Surface as atlas output
Snapshot->>Build: snapshot dict
Build->>Locations: enrich each visible location with node metadata
Locations->>Surface: known_locations with biome/terrain/danger/atlas_layer/tags
Build->>Edges: provide snapshot to _atlas_edges
Edges->>Surface: edges with attached edge payload (route_kind,difficulty,danger,tags,minutes)
Build->>Travel: _atlas_travel_options uses edge payload
Travel->>Surface: travel_options with minutes fallback and route attributes
Estimated Code Review Effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly Related Issues
Possibly Related PRs
✨ Finishing Touches📝 Generate docstrings
Comment |
100yenadmin
force-pushed
the
engine/worldgraph-skeleton
branch
from
May 26, 2026 18:53
133e8eb to
12019b3
Compare
100yenadmin
marked this pull request as ready for review
May 26, 2026 18:53
This was referenced May 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the first clean-room
WorldGraphskeleton for issue #175.This PR is intentionally a small draft slice: it creates additive engine-owned graph metadata and projects it through the Atlas read model. It does not import Azgaar, does not add a map generator, and does not make graph edges a second travel authority.
Refs #175, #60, #117.
What Changed
WorldGraphWorldGraphNodeWorldGraphEdgeCampaign.world_graphmetadata.seed_world()now loads optionalworld_graphmetadata and skips malformed or unauthorized refs.Location.connectionsroute./atlas-surfacenow projects route kind, difficulty, danger, biome, terrain, graph tags, and graph-provided travel minutes when available.Architecture Boundary
Campaign.locationsandLocation.connectionsremain canonical.WorldGraphcannot create locations and cannot authorize travel. Viewer/OpenWorlds may render the graph and post player intent through/move, but it must not write graph nodes, graph edges, discovery, travel state, or strategic clocks.External Research
Azgaar/Fantasy-Map-Generator is reference-only. Useful concepts are route classes, graph metadata, terrain/biome tags, and travel-cost thinking. This PR does not vendor Azgaar UI, save format, map assets, generated geometry, or runtime dependencies.
Validation
Run from
/Volumes/LEXAR/repos/ClawDnD-worldgraph-skeleton:Draft Notes
This is visible early by design. Follow-up review should decide whether the next slice belongs in travel return payloads, wander/danger weighting, OpenWorlds map rendering, or content schema docs.
Rollback Plan
Revert this PR to remove the optional metadata and Atlas fields. Existing campaigns without
world_graphare unaffected because every field is additive.Summary by CodeRabbit
New Features
Tests