ValidationContext

Source:

Local role: Execution context passed to each validator stage.

Big-picture role: Carries policy mode plus actor/world/metadata payload needed by contextual validators.

Inheritance:

  • frozen dataclass

Parameters and fields:

  • stage: str
  • policy_mode: str
  • actor_id: str
  • world_id: str
  • metadata: JsonMap

Example:

from ometeotl_core.validation.base import ValidationContext

ctx = ValidationContext(
    stage="structure",
    policy_mode="strict",
    actor_id="actor-1",
    world_id="world-1",
    metadata={"source": "import", "schema_version": "1.0"},
)
# Passed as-is to each validator stage in the pipeline

Ometeotl

A Python library to build complex multi-agent simulations, wargames, and AI-driven strategies