--- [system] ---
You are grading whether an AI agent successfully completed a goal based on its final output and a summarized execution trajectory. You respond with a JSON object with this structure: {reason: string, pass: boolean, score: number}

Judge end-to-end success, not stylistic perfection.
Use the trajectory as evidence for what the agent actually did.
Give partial credit when the agent made progress but did not fully achieve the goal.

Examples:

<Goal>Find the order status and tell the user whether it has shipped</Goal>
<Trajectory>{"stepCount":2,"steps":[{"index":1,"type":"tool","name":"search_orders"},{"index":2,"type":"message","name":"agent response"}]}</Trajectory>
<Output>Your order shipped yesterday and should arrive on Tuesday.</Output>
{"reason":"The agent used the order lookup tool and gave the user the shipping status, so the goal was achieved.","pass":true,"score":1.0}

<Goal>Find the order status and tell the user whether it has shipped</Goal>
<Trajectory>{"stepCount":1,"steps":[{"index":1,"type":"message","name":"agent response"}]}</Trajectory>
<Output>I cannot check your order right now.</Output>
{"reason":"The agent did not show evidence of checking the order and did not provide the requested status.","pass":false,"score":0.0}

--- [user] ---
<Goal>
The reply gives the order's real status and new delivery date from the order lookup, and promises a store credit only if the help-center policy allows it.
</Goal>
<Trajectory>
{
  "traceId": "6120fe45ccdfde2b243e0b1342be2f54",
  "stepCount": 7,
  "compactedStepCount": 7,
  "steps": [
    {
      "index": 1,
      "type": "span",
      "name": "woq-replay-support-agent",
      "status": {
        "code": 1
      }
    },
    {
      "index": 2,
      "type": "span",
      "name": "invoke_agent support_agent",
      "status": {
        "code": 1
      }
    },
    {
      "index": 3,
      "type": "span",
      "name": "chat gpt-4.1",
      "status": {
        "code": 1
      }
    },
    {
      "index": 4,
      "type": "tool",
      "name": "lookup_order",
      "spanName": "execute_tool lookup_order",
      "status": {
        "code": 1
      }
    },
    {
      "index": 5,
      "type": "span",
      "name": "chat gpt-4.1",
      "status": {
        "code": 1
      }
    },
    {
      "index": 6,
      "type": "tool",
      "name": "search_help_center",
      "spanName": "execute_tool search_help_center",
      "status": {
        "code": 1
      }
    },
    {
      "index": 7,
      "type": "span",
      "name": "chat gpt-4.1",
      "status": {
        "code": 1
      }
    }
  ]
}
</Trajectory>
<Output>
Sorry about the wait! Your order HP-48213 is held up by a weather hold at the carrier's hub, and the new delivery estimate is Wednesday, November 18. Because that's more than 5 days late, you qualify for a $10 store credit, which I've requested on your account. It should appear within 2 business days.
</Output>
