{
  "schema_version": "1.0.0",
  "service": "agent-decision-gate-api",
  "examples": [
    {
      "name": "healthy_branch_continue",
      "endpoint": "/v1/branches/evaluate",
      "intent": "Runtime checkpoint: check whether a productive autonomous-agent branch should continue.",
      "input_fixture": "fixtures/scenarios/normal_continue.json",
      "expected": {
        "permission_decision": "ALLOW",
        "operational_action": "CONTINUE_BRANCH",
        "reason_codes": [
          "BRANCH_HEALTHY"
        ]
      }
    },
    {
      "name": "looping_branch_prune",
      "endpoint": "/v1/branches/evaluate",
      "intent": "Budget guardrail: stop repeated low-progress execution before it burns more compute.",
      "input_fixture": "fixtures/scenarios/loop_prune.json",
      "expected": {
        "permission_decision": "ALLOW",
        "operational_action": "PRUNE_BRANCH",
        "reason_codes": [
          "LOOP_DETECTED"
        ]
      }
    },
    {
      "name": "payment_budget_denied",
      "endpoint": "/v1/branches/evaluate",
      "intent": "Payment guardrail: deny a payment operation when no USDC budget authorization exists.",
      "input_fixture": "fixtures/scenarios/payment_budget_denied.json",
      "expected": {
        "permission_decision": "DENY",
        "operational_action": "ABSTAIN",
        "reason_codes": [
          "BUDGET_AUTHORIZATION_MISSING"
        ]
      }
    },
    {
      "name": "claim_overreach_audit",
      "endpoint": "/v1/branches/evaluate",
      "intent": "Claim audit preflight: force escalation when the branch makes claims beyond supplied evidence.",
      "input_fixture": "fixtures/scenarios/claim_overreach.json",
      "expected": {
        "permission_decision": "REQUIRE_APPROVAL",
        "operational_action": "ESCALATE_VERIFICATION",
        "reason_codes": [
          "CLAIM_OVERREACH",
          "CLAIM_FIDELITY_UNCONFIRMED",
          "VERIFICATION_REQUIRED"
        ]
      }
    },
    {
      "name": "insufficient_context_abstain",
      "endpoint": "/v1/branches/evaluate",
      "intent": "External checkpoint: abstain when the agent lacks enough context for a reliable decision.",
      "input_fixture": "fixtures/scenarios/insufficient_context_abstain.json",
      "expected": {
        "permission_decision": "ABSTAIN",
        "operational_action": "ABSTAIN",
        "reason_codes": [
          "INSUFFICIENT_CONTEXT"
        ]
      }
    },
    {
      "name": "high_burn_stop",
      "endpoint": "/v1/branches/evaluate",
      "intent": "Cost guardrail: stop a branch whose burn is too high relative to progress.",
      "input_fixture": "fixtures/scenarios/stall_high_burn_stop.json",
      "expected": {
        "permission_decision": "DENY",
        "operational_action": "STOP_RUN",
        "reason_codes": [
          "STALL_HIGH_BURN",
          "BUDGET_EXHAUSTED"
        ]
      }
    },
    {
      "name": "multi_step_branch_chain",
      "endpoint": "/v1/branches/evaluate?persist=true",
      "intent": "Recurring checkpoint: send the previous receipt integrity hash as previous_receipt_hash when the same run_id and branch_id continue.",
      "sequence": [
        {
          "step": 1,
          "previous_receipt_hash": null,
          "instruction": "Run the first checkpoint and store receipt.integrity_hash."
        },
        {
          "step": 2,
          "previous_receipt_hash": "{step_1.receipt.integrity_hash}",
          "instruction": "Run the next checkpoint for the same run_id and branch_id. Persistence rejects stale chain heads."
        }
      ],
      "expected": {
        "chain_property": "each follow-up checkpoint links to the previous receipt hash",
        "revisit_reason": "the receipt chain gives the agent a concrete reason to return"
      }
    },
    {
      "name": "receipt_verify",
      "endpoint": "/v1/receipts/verify",
      "intent": "Verify that a returned decision receipt has not been tampered with.",
      "request_shape": {
        "receipt": "{receipt returned by /v1/branches/evaluate}"
      },
      "expected": {
        "valid": true
      }
    }
  ]
}