Source:
Local role: First-class objective model object for one actor.
Big-picture role: Teleology representation primitive that remains domain-neutral while supporting final and intermediate objectives.
Inheritance:
Fields:
- id: str
- actor_id: str
- kind: str (
finalorintermediate) - priority: float
- status: str
- horizon: dict
- target_condition: dict
- target_perception_id: Optional[str]
- parent_goal_id: Optional[str]
- child_goal_ids: list[str]
- strategy_ids: list[str]
Methods:
add_child_goal(goal_id) -> Noneremove_child_goal(goal_id) -> Noneadd_strategy(strategy_id) -> Noneremove_strategy(strategy_id) -> Noneto_dict() -> dictfrom_dict(data) -> Goal
Example:
from ometeotl_core.model.goals import Goal
goal = Goal(
id="goal-1",
actor_id="actor-1",
kind="final",
priority=1.0,
status="active",
target_condition={"location": "target-zone"},
horizon={"window": 10},
)
goal.add_strategy("strategy-1")
# Intermediate sub-goal
sub = Goal(
id="goal-2",
actor_id="actor-1",
kind="intermediate",
priority=0.8,
status="active",
target_condition={"step1": True},
parent_goal_id="goal-1",
)
goal.add_child_goal("goal-2")
data = goal.to_dict()
goal2 = Goal.from_dict(data)
See also:
