{
  "contractVersion": "1.1.0",
  "description": "The Phase 0 questions of a /multi-agent run, as data. A client can render them before launch and hand the answers over in a launch request (launch-request.schema.json); Phase 0 then pre-fills the matching pickers instead of asking. Order is the order Phase 0 reaches them. `source` names a command that enumerates the options as redacted JSON; null means no such command ships yet and `sourceNote` says what exists instead. Labels are English fallbacks - the pipeline renders its own pickers in outputLanguage. Shape: run-questions.schema.json.",
  "questions": [
    {
      "id": "update",
      "kind": "single-select",
      "asked-at": "phase-0 step 0.6",
      "answerable": true,
      "options": [
        {
          "id": "update",
          "label": "Update now"
        },
        {
          "id": "continue",
          "label": "Continue without updating"
        }
      ],
      "default": "update",
      "skippable-when": [
        "no newer release is available",
        "prefs.global.updateCheck.autoUpdate is true (the default), which updates without asking"
      ],
      "source": null
    },
    {
      "id": "account",
      "kind": "single-select",
      "asked-at": "phase-0 account picker (_account-picker.md)",
      "answerable": true,
      "answer": {
        "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]*$",
        "description": "the account id",
        "example": "work"
      },
      "skippable-when": [
        "exactly one account is configured",
        "free-text input whose repos are all local-only"
      ],
      "source": null,
      "sourceNote": "lib/account-resolver.sh lists the accounts, but its JSON carries hosts and credential key names; a redacted enumerator is not shipped yet"
    },
    {
      "id": "intent",
      "kind": "single-select",
      "asked-at": "phase-0 step 1 intent guard",
      "answerable": true,
      "options": [
        {
          "id": "answer-here",
          "label": "Answer here"
        },
        {
          "id": "treat-as-task",
          "label": "Treat as a task"
        }
      ],
      "default": "answer-here",
      "skippable-when": [
        "the input is not free text",
        "the intent classifier reads the input as a task",
        "prefs.global.intentGuard.enabled is false"
      ],
      "source": null
    },
    {
      "id": "create-jira",
      "kind": "single-select",
      "asked-at": "phase-0 step 1 free-text",
      "answerable": true,
      "options": [
        {
          "id": "create",
          "label": "Create"
        },
        {
          "id": "skip",
          "label": "Skip"
        }
      ],
      "default": "skip",
      "skippable-when": ["the input is not free text"],
      "source": null
    },
    {
      "id": "repo",
      "kind": "single-select",
      "asked-at": "phase-0 step 2",
      "answerable": true,
      "answer": {
        "pattern": "^[A-Za-z0-9._-]+(/[A-Za-z0-9._-]+)?$",
        "description": "a repo name as the picker lists it",
        "example": "example-app"
      },
      "stateField": "project",
      "skippable-when": ["the input names the repo (issue URL, repo#N)"],
      "source": null,
      "sourceNote": "lib/repo-cache.sh lists repos per provider and prints local paths for local ones; a redacted enumerator is not shipped yet"
    },
    {
      "id": "issue",
      "kind": "single-select",
      "asked-at": "`jira` / `issue` input, the aggregate issue picker (commands/multi-agent/jira, commands/multi-agent/issue step 3)",
      "answerable": true,
      "answer": {
        "pattern": "^([A-Z][A-Z0-9]*-[0-9]+|[A-Za-z0-9._-]+/[A-Za-z0-9._-]+#[0-9]+)$",
        "description": "a Jira key or owner/repo#N, as issues.mjs prints it",
        "example": "PROJ-123"
      },
      "skippable-when": ["the input names the item (Jira key, issue URL, repo#N)"],
      "source": "scripts/issues.mjs --json --redact"
    },
    {
      "id": "save-group",
      "kind": "single-select",
      "asked-at": "phase-0 step 2 multi-repo",
      "answerable": true,
      "options": [
        {
          "id": "save",
          "label": "Save"
        },
        {
          "id": "skip",
          "label": "Skip"
        }
      ],
      "default": "skip",
      "skippable-when": [
        "fewer than two repos are selected",
        "the selection is already a saved group"
      ],
      "source": null
    },
    {
      "id": "test-policy",
      "kind": "single-select",
      "asked-at": "phase-0 step 2 test policy",
      "answerable": true,
      "options": [
        {
          "id": "tdd",
          "label": "TDD"
        },
        {
          "id": "tests-after",
          "label": "Tests after"
        },
        {
          "id": "none",
          "label": "No tests"
        }
      ],
      "default": "tdd",
      "skippable-when": ["prefs.projects[<slug>].testPolicy is recorded"],
      "source": null
    },
    {
      "id": "dev-context",
      "kind": "multi-select",
      "asked-at": "phase-0 step 2b (_dev-context.md)",
      "answerable": true,
      "answer": {
        "pattern": "^[A-Za-z0-9._-]+(/[A-Za-z0-9._-]+)?$",
        "description": "repo names; an empty list means the primary repo only",
        "example": "example-lib"
      },
      "stateField": "siblings",
      "source": null,
      "sourceNote": "lib/submodule-detector.sh lists candidates, but its JSON carries remote URLs; a redacted enumerator is not shipped yet"
    },
    {
      "id": "base-branch",
      "kind": "single-select",
      "asked-at": "phase-0 step 3",
      "answerable": true,
      "answer": {
        "pattern": "^[A-Za-z0-9._/-]+$",
        "description": "a branch name, with or without origin/",
        "example": "origin/develop"
      },
      "stateField": "baseBranch",
      "skippable-when": ["a branch was given with the input"],
      "source": null,
      "sourceNote": "the candidates are `git branch -r` filtered at Step 3; no standalone enumerator ships"
    },
    {
      "id": "base-fetch-failure",
      "kind": "single-select",
      "asked-at": "phase-0 step 3 fetch-fail handling",
      "answerable": true,
      "options": [
        {
          "id": "retry",
          "label": "Connect VPN and retry"
        },
        {
          "id": "cached",
          "label": "Use cached origin ref"
        },
        {
          "id": "local-branch",
          "label": "Use local branch as base"
        },
        {
          "id": "abort",
          "label": "Abort"
        }
      ],
      "default": "retry",
      "stateField": "baseFetchStatus",
      "skippable-when": ["git fetch succeeds"],
      "source": null
    },
    {
      "id": "maturity",
      "kind": "single-select",
      "asked-at": "phase-0 maturity step (features/maturity-followup.md)",
      "answerable": true,
      "options": [
        {
          "id": "fix",
          "label": "Open the item and fix it"
        },
        {
          "id": "continue",
          "label": "Continue without it"
        },
        {
          "id": "abort",
          "label": "Abort"
        }
      ],
      "default": "fix",
      "skippable-when": ["the maturity check reports no blockers"],
      "source": null
    },
    {
      "id": "maturity-warning",
      "kind": "single-select",
      "asked-at": "phase-0 maturity step, warnings only",
      "answerable": true,
      "options": [
        {
          "id": "continue",
          "label": "Continue"
        },
        {
          "id": "abort",
          "label": "Abort"
        }
      ],
      "default": "continue",
      "skippable-when": ["the maturity check reports no warnings"],
      "source": null
    },
    {
      "id": "parent-description",
      "kind": "single-select",
      "asked-at": "phase-0 maturity step, empty description with a parent or sibling candidate",
      "answerable": true,
      "options": [
        {
          "id": "use-parent",
          "label": "Use parent's description"
        },
        {
          "id": "halt",
          "label": "No, halt"
        }
      ],
      "default": "use-parent",
      "skippable-when": ["the item has its own description"],
      "source": null
    },
    {
      "id": "workspace",
      "kind": "single-select",
      "asked-at": "phase-0 step 5b",
      "answerable": true,
      "options": [
        {
          "id": "worktree",
          "label": "Worktree"
        },
        {
          "id": "local",
          "label": "Local"
        }
      ],
      "default": "worktree",
      "stateField": "localMode",
      "disabled-when": [
        {
          "mode": "autopilot",
          "option": "local"
        },
        {
          "mode": "background",
          "option": "local"
        },
        {
          "workingTree": "dirty",
          "option": "local"
        }
      ],
      "source": null
    },
    {
      "id": "identity",
      "kind": "single-select",
      "asked-at": "phase-0 step 6a",
      "answerable": false,
      "skippable-when": [
        "a platformIdentityRouting rule matches",
        "the project has a last identity",
        "exactly one identity is configured"
      ],
      "source": null,
      "sourceNote": "an identity carries a name and an email; no redacted enumerator ships, so a request cannot choose one"
    },
    {
      "id": "task-type",
      "kind": "single-select",
      "asked-at": "phase-0 step 7 fallback",
      "answerable": true,
      "options": [
        {
          "id": "component",
          "label": "Component"
        },
        {
          "id": "bugfix",
          "label": "Bugfix"
        },
        {
          "id": "feature",
          "label": "Feature"
        },
        {
          "id": "refactor",
          "label": "Refactor"
        },
        {
          "id": "chore",
          "label": "Chore"
        }
      ],
      "default": "feature",
      "stateField": "taskType",
      "skippable-when": ["a Step 7 rule classifies the task"],
      "source": null
    },
    {
      "id": "test-depth",
      "kind": "single-select",
      "asked-at": "phase-0 step 7.7",
      "answerable": true,
      "options": [
        {
          "id": "unit",
          "label": "Unit tests only"
        },
        {
          "id": "unit+ui",
          "label": "Unit + UI tests, recorded"
        },
        {
          "id": "unit+mcp",
          "label": "Unit + MCP flow recording"
        }
      ],
      "default": "unit",
      "stateField": "testDepth",
      "skippable-when": [
        "visualEvidence.enabled is false",
        "only the unit option is open on this machine"
      ],
      "source": null,
      "sourceNote": "which options are open is measured by probe-evidence-capability.sh at run time; a closed option in a request falls back to the question"
    },
    {
      "id": "clarification",
      "kind": "dynamic",
      "asked-at": "phase-0 step 8",
      "answerable": false,
      "skippable-when": [
        "prefs.global.clarifyAmbiguous.enabled is false (the default)",
        "the clarifier scores the task clear enough"
      ],
      "source": null,
      "sourceNote": "the questions are written by the task-clarifier agent for this task, so no request can know them in advance"
    }
  ]
}
