from splinter.coordination import GoalTracker, Goaltracker = GoalTracker()# Define goal with criteriatracker.set_goal(Goal( goal_id="article", description="Publish a blog post about AI trends", success_criteria=["Research", "Draft", "Review", "Publish"],))# Mark progresstracker.mark_criterion_met("article", "Research")tracker.mark_criterion_met("article", "Draft")# Check statusprint(tracker.get_progress("article")) # 0.5 (50%)print(tracker.is_achieved("article")) # False
# Is goal achieved?if tracker.is_achieved("article"): print("Goal complete!")# Get all goalsall_goals = tracker.get_all_goals()# Get incomplete goalsincomplete = tracker.get_incomplete_goals()# Get goals by priorityurgent = tracker.get_goals_by_priority(min_priority=5)