workflow-twin / baselines /heuristics.py
NDGCodes's picture
fix repo structure for HF
1a692ce
raw
history blame contribute delete
597 Bytes
from workflow_twin.models import Action, Observation
def greedy_queue_policy(obs: Observation) -> Action:
if obs.ticket_id is None:
return Action(action_type="skip", note="no_ticket")
if obs.severity == "high" and obs.attempts_used >= 1:
return Action(action_type="escalate", note="high_severity")
if obs.attempts_remaining <= 1:
return Action(action_type="resolve", note="final_attempt")
if obs.ticket_status == "open":
return Action(action_type="triage", note="initial_triage")
return Action(action_type="respond", note="continue_work")