Skip to content

M-14: Create Location #26

@spuentesp

Description

@spuentesp

Category: manage | Epic: 3 | Priority: high

Summary

Create a location entity (city, building, region, planet, room, wilderness).
Supports hierarchical containment (location within location) and
spatial properties.

Acceptance Criteria

  • neo4j_create_entity creates location node with entity_type='location'
  • Location type validated against allowed values
  • is_exterior property stored correctly
  • Parent location selection shows locations in same universe
  • LOCATED_IN relationship created when parent selected
  • Location hierarchy navigable (city -> district -> building -> room)
  • Unit tests cover hierarchical locations

Dependencies

This use case depends on:

  • DL-2
  • M-12

Blocks

This use case blocks:

  • P-2

Implementation

Layer: 3

Files to modify:

  • packages/cli/src/monitor_cli/commands/manage/entity.py

NEO4J Operations:

  • neo4j_list_entities (authority: *)
  • neo4j_create_entity (authority: CanonKeeper)
  • neo4j_create_relationship (authority: CanonKeeper)

Notes:

  • Consider adding map coordinates for visualization
  • Danger level helps with encounter generation
  • Vehicle locations can move between parent locations

Testing Requirements

Minimum coverage: 80%

Unit tests:

  • test_create_location_basic: minimal location created
  • test_create_location_with_parent: hierarchy established
  • test_create_location_types: all types valid
  • test_create_location_exterior: is_exterior stored

Integration tests:

  • test_location_hierarchy: nested locations navigable
  • test_location_cli: CLI location creation works

References

Documentation:


Generated from /home/sebas/monitor2/docs/use-cases/manage/M-14.yml

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockedBlocked by unfinished dependenciesmanageWorld administration (M-*)

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions