{
  "kind": "original-bounded-choice-workflow",
  "version": 1,
  "scope": "Classify keyboard focus containment during an explicitly modal interaction from supplied forward and backward observations.",
  "question": "Use the supplied modal setting and observed keyboard behavior. Contained means Tab and Shift+Tab both stay inside the open modal; Escape means either moves focus to the background while it remains modal; Nonmodal means the interaction is explicitly nonmodal; Unclear means modality or either required focus path is missing. An observed escape is enough despite other missing paths. Do not infer behavior from a library import or role alone.",
  "choices": [
    "Contained",
    "Escape",
    "Nonmodal",
    "Unclear"
  ],
  "actions": {
    "Contained": {
      "action": "preview_jev_modal_focus_containment",
      "payload": {
        "decision": "Contained"
      },
      "pending": true
    },
    "Escape": {
      "action": "preview_jev_modal_focus_containment",
      "payload": {
        "decision": "Escape"
      },
      "pending": true
    },
    "Nonmodal": {
      "action": "preview_jev_modal_focus_containment",
      "payload": {
        "decision": "Nonmodal"
      },
      "pending": true
    },
    "Unclear": {
      "action": "preview_jev_modal_focus_containment",
      "payload": {
        "decision": "Unclear"
      },
      "pending": true
    }
  },
  "samples": [
    {
      "id": "case-1",
      "label": "Both directions wrap",
      "expected": "Contained",
      "request": {
        "context": "{\n  \"task\": \"Classify keyboard focus containment during an explicitly modal interaction from supplied forward and backward observations.\",\n  \"evidence\": {\n    \"modal\": true,\n    \"open\": true,\n    \"tab\": \"From last control to first inside the dialog.\",\n    \"shiftTab\": \"From first control to last inside the dialog.\",\n    \"otherFocusableControls\": \"None outside reached.\"\n  }\n}",
        "question": "Use the supplied modal setting and observed keyboard behavior. Contained means Tab and Shift+Tab both stay inside the open modal; Escape means either moves focus to the background while it remains modal; Nonmodal means the interaction is explicitly nonmodal; Unclear means modality or either required focus path is missing. An observed escape is enough despite other missing paths. Do not infer behavior from a library import or role alone.",
        "choices": [
          "Contained",
          "Escape",
          "Nonmodal",
          "Unclear"
        ]
      }
    },
    {
      "id": "case-2",
      "label": "Forward escape",
      "expected": "Escape",
      "request": {
        "context": "{\n  \"task\": \"Classify keyboard focus containment during an explicitly modal interaction from supplied forward and backward observations.\",\n  \"evidence\": {\n    \"modal\": true,\n    \"open\": true,\n    \"tab\": \"From last dialog control to the page footer outside.\",\n    \"shiftTab\": \"From first to last inside.\"\n  }\n}",
        "question": "Use the supplied modal setting and observed keyboard behavior. Contained means Tab and Shift+Tab both stay inside the open modal; Escape means either moves focus to the background while it remains modal; Nonmodal means the interaction is explicitly nonmodal; Unclear means modality or either required focus path is missing. An observed escape is enough despite other missing paths. Do not infer behavior from a library import or role alone.",
        "choices": [
          "Contained",
          "Escape",
          "Nonmodal",
          "Unclear"
        ]
      }
    },
    {
      "id": "case-3",
      "label": "Backward escape",
      "expected": "Escape",
      "request": {
        "context": "{\n  \"task\": \"Classify keyboard focus containment during an explicitly modal interaction from supplied forward and backward observations.\",\n  \"evidence\": {\n    \"modal\": true,\n    \"open\": true,\n    \"tab\": \"Cycles inside.\",\n    \"shiftTab\": \"From first dialog control to the page header outside.\"\n  }\n}",
        "question": "Use the supplied modal setting and observed keyboard behavior. Contained means Tab and Shift+Tab both stay inside the open modal; Escape means either moves focus to the background while it remains modal; Nonmodal means the interaction is explicitly nonmodal; Unclear means modality or either required focus path is missing. An observed escape is enough despite other missing paths. Do not infer behavior from a library import or role alone.",
        "choices": [
          "Contained",
          "Escape",
          "Nonmodal",
          "Unclear"
        ]
      }
    },
    {
      "id": "case-4",
      "label": "One direction unknown",
      "expected": "Unclear",
      "request": {
        "context": "{\n  \"task\": \"Classify keyboard focus containment during an explicitly modal interaction from supplied forward and backward observations.\",\n  \"evidence\": {\n    \"modal\": true,\n    \"open\": true,\n    \"tab\": \"Cycles inside.\",\n    \"shiftTab\": null\n  }\n}",
        "question": "Use the supplied modal setting and observed keyboard behavior. Contained means Tab and Shift+Tab both stay inside the open modal; Escape means either moves focus to the background while it remains modal; Nonmodal means the interaction is explicitly nonmodal; Unclear means modality or either required focus path is missing. An observed escape is enough despite other missing paths. Do not infer behavior from a library import or role alone.",
        "choices": [
          "Contained",
          "Escape",
          "Nonmodal",
          "Unclear"
        ]
      }
    },
    {
      "id": "case-5",
      "label": "An explicit nonmodal panel",
      "expected": "Nonmodal",
      "request": {
        "context": "{\n  \"task\": \"Classify keyboard focus containment during an explicitly modal interaction from supplied forward and backward observations.\",\n  \"evidence\": {\n    \"modal\": false,\n    \"open\": true,\n    \"tab\": \"Continues from panel into page content.\",\n    \"shiftTab\": \"Returns to page controls.\"\n  }\n}",
        "question": "Use the supplied modal setting and observed keyboard behavior. Contained means Tab and Shift+Tab both stay inside the open modal; Escape means either moves focus to the background while it remains modal; Nonmodal means the interaction is explicitly nonmodal; Unclear means modality or either required focus path is missing. An observed escape is enough despite other missing paths. Do not infer behavior from a library import or role alone.",
        "choices": [
          "Contained",
          "Escape",
          "Nonmodal",
          "Unclear"
        ]
      }
    },
    {
      "id": "case-6",
      "label": "Library name only",
      "expected": "Unclear",
      "request": {
        "context": "{\n  \"task\": \"Classify keyboard focus containment during an explicitly modal interaction from supplied forward and backward observations.\",\n  \"evidence\": {\n    \"modal\": true,\n    \"open\": true,\n    \"component\": \"CustomDialog using a familiar UI library\",\n    \"tab\": null,\n    \"shiftTab\": null\n  }\n}",
        "question": "Use the supplied modal setting and observed keyboard behavior. Contained means Tab and Shift+Tab both stay inside the open modal; Escape means either moves focus to the background while it remains modal; Nonmodal means the interaction is explicitly nonmodal; Unclear means modality or either required focus path is missing. An observed escape is enough despite other missing paths. Do not infer behavior from a library import or role alone.",
        "choices": [
          "Contained",
          "Escape",
          "Nonmodal",
          "Unclear"
        ]
      }
    }
  ],
  "consumer": "preview_choice_workflow.py"
}
