{
  "kind": "original-bounded-choice-workflow",
  "version": 1,
  "scope": "Inspect supplied small JavaScript function text and explicit dependency behavior for input/external-state mutation or I/O, local-only computation, or an unknown helper. This is a bounded semantic review of visible text; no code runs and it is not a proof of purity, security or repository correctness.",
  "question": "Inspect functionText and supplied dependencyNotes. Outside effect: visible input/external-state mutation or I/O. Local-only: visible work affects only local variables or new objects and supplied helpers are explicitly local-only. Need dependency: an unresolved helper or missing function prevents the judgment. Caller-owned input mutation counts as outside; local reassignment does not. Do not run code or assume helper behavior.",
  "choices": [
    "Outside effect",
    "Local-only",
    "Need dependency"
  ],
  "actions": {
    "Outside effect": {
      "action": "preview_function_side_effects",
      "payload": {
        "decision": "Outside effect"
      },
      "pending": true
    },
    "Local-only": {
      "action": "preview_function_side_effects",
      "payload": {
        "decision": "Local-only"
      },
      "pending": true
    },
    "Need dependency": {
      "action": "preview_function_side_effects",
      "payload": {
        "decision": "Need dependency"
      },
      "pending": true
    }
  },
  "samples": [
    {
      "id": "arithmetic",
      "label": "Arithmetic using local values",
      "expected": "Local-only",
      "request": {
        "context": "{\n  \"task\": \"Inspect the supplied function for outside effects.\",\n  \"functionText\": \"function sum(a, b) { return a + b; }\",\n  \"dependencyNotes\": \"a and b are ordinary numbers. No overridden built-ins or other dependencies.\"\n}",
        "question": "Inspect functionText and supplied dependencyNotes. Outside effect: visible input/external-state mutation or I/O. Local-only: visible work affects only local variables or new objects and supplied helpers are explicitly local-only. Need dependency: an unresolved helper or missing function prevents the judgment. Caller-owned input mutation counts as outside; local reassignment does not. Do not run code or assume helper behavior.",
        "choices": [
          "Outside effect",
          "Local-only",
          "Need dependency"
        ]
      }
    },
    {
      "id": "input-sort",
      "label": "Sorting the caller array",
      "expected": "Outside effect",
      "request": {
        "context": "{\n  \"task\": \"Inspect the supplied function for outside effects.\",\n  \"functionText\": \"function sorted(items) { return items.sort((a, b) => a - b); }\",\n  \"dependencyNotes\": \"items is the caller-owned array of ordinary numbers. Array.prototype.sort is the standard in-place method.\"\n}",
        "question": "Inspect functionText and supplied dependencyNotes. Outside effect: visible input/external-state mutation or I/O. Local-only: visible work affects only local variables or new objects and supplied helpers are explicitly local-only. Need dependency: an unresolved helper or missing function prevents the judgment. Caller-owned input mutation counts as outside; local reassignment does not. Do not run code or assume helper behavior.",
        "choices": [
          "Outside effect",
          "Local-only",
          "Need dependency"
        ]
      }
    },
    {
      "id": "copy-sort",
      "label": "Sorting a new local array",
      "expected": "Local-only",
      "request": {
        "context": "{\n  \"task\": \"Inspect the supplied function for outside effects.\",\n  \"functionText\": \"function sorted(items) { const copy = [...items]; return copy.sort((a, b) => a - b); }\",\n  \"dependencyNotes\": \"items contains ordinary numbers. Standard array operations and the subtraction comparator have no hidden effects.\"\n}",
        "question": "Inspect functionText and supplied dependencyNotes. Outside effect: visible input/external-state mutation or I/O. Local-only: visible work affects only local variables or new objects and supplied helpers are explicitly local-only. Need dependency: an unresolved helper or missing function prevents the judgment. Caller-owned input mutation counts as outside; local reassignment does not. Do not run code or assume helper behavior.",
        "choices": [
          "Outside effect",
          "Local-only",
          "Need dependency"
        ]
      }
    },
    {
      "id": "outer-state",
      "label": "Changing enclosing state",
      "expected": "Outside effect",
      "request": {
        "context": "{\n  \"task\": \"Inspect the supplied function for outside effects.\",\n  \"functionText\": \"let calls = 0; function countCall() { calls += 1; return calls; }\",\n  \"dependencyNotes\": \"calls is enclosing state shared across calls, not a new function-local variable.\"\n}",
        "question": "Inspect functionText and supplied dependencyNotes. Outside effect: visible input/external-state mutation or I/O. Local-only: visible work affects only local variables or new objects and supplied helpers are explicitly local-only. Need dependency: an unresolved helper or missing function prevents the judgment. Caller-owned input mutation counts as outside; local reassignment does not. Do not run code or assume helper behavior.",
        "choices": [
          "Outside effect",
          "Local-only",
          "Need dependency"
        ]
      }
    },
    {
      "id": "network",
      "label": "Sending an HTTP request",
      "expected": "Outside effect",
      "request": {
        "context": "{\n  \"task\": \"Inspect the supplied function for outside effects.\",\n  \"functionText\": \"function sendRecord(record) { return fetch(\\\"https://example.invalid/records\\\", { method: \\\"POST\\\", body: JSON.stringify(record) }); }\",\n  \"dependencyNotes\": \"fetch performs external HTTP I/O. The fictional snippet is supplied as text and is not executed.\"\n}",
        "question": "Inspect functionText and supplied dependencyNotes. Outside effect: visible input/external-state mutation or I/O. Local-only: visible work affects only local variables or new objects and supplied helpers are explicitly local-only. Need dependency: an unresolved helper or missing function prevents the judgment. Caller-owned input mutation counts as outside; local reassignment does not. Do not run code or assume helper behavior.",
        "choices": [
          "Outside effect",
          "Local-only",
          "Need dependency"
        ]
      }
    },
    {
      "id": "unknown-helper",
      "label": "Helper implementation missing",
      "expected": "Need dependency",
      "request": {
        "context": "{\n  \"task\": \"Inspect the supplied function for outside effects.\",\n  \"functionText\": \"function prepare(record) { return normalizeRecord(record); }\",\n  \"dependencyNotes\": \"normalizeRecord implementation and effect contract are not supplied.\"\n}",
        "question": "Inspect functionText and supplied dependencyNotes. Outside effect: visible input/external-state mutation or I/O. Local-only: visible work affects only local variables or new objects and supplied helpers are explicitly local-only. Need dependency: an unresolved helper or missing function prevents the judgment. Caller-owned input mutation counts as outside; local reassignment does not. Do not run code or assume helper behavior.",
        "choices": [
          "Outside effect",
          "Local-only",
          "Need dependency"
        ]
      }
    }
  ],
  "consumer": "preview_choice_workflow_v2.py"
}
