"""okstra-run wizard — state machine for interactive task setup.

The okstra-run skill used to encode the full input-collection flow in prose,
which drifted into seven internal inconsistencies (executor placement,
free-text-via-AskUserQuestion, missing clarification prompt for impl, etc.).
This package owns the flow as code so the skill becomes a thin loop.

Public surface (re-exported here; the skill calls it through the
``okstra wizard`` CLI in ``cli.py`` and never imports this package directly):
- ``WizardState``   - serializable dataclass; one state file per run (``state``).
- ``Prompt``        - what the skill should ask next (``state``).
- ``init_state()``  - seed from project-root / project-id / workspace-root (``engine``).
- ``next_prompt()`` - deterministic; pure read on state (``engine``).
- ``submit()``      - validate + advance (``engine``).
- ``render_args()`` - final args for ``okstra render-bundle`` (``render``).
- ``wizard_outcome()`` - final args plus persistence actions and confirmation (``render``).

Module order is the import order: ``ids`` → ``state`` → ``prompts`` → ``sources``
→ ``roles`` → ``statefile`` → ``steps_*`` → ``confirmation`` → ``registry`` →
``engine`` → ``render`` → ``cli``. A module imports only modules before it;
``tests/contract/test_no_import_cycles.py`` keeps it that way.
"""
from __future__ import annotations

from .ids import (
    ALL_STAGES,
    ANTIGRAVITY_MODEL_OPTIONS,
    BASE_REF_FREE_INPUT_TOKEN,
    BRIEF_CARRY_ABORT,
    BRIEF_CARRY_SWITCH_ENTRY,
    CANONICAL_BASE_REFS,
    CLAUDE_MODEL_OPTIONS,
    CODEX_MODEL_OPTIONS,
    EXECUTORS,
    GROK_MODEL_OPTIONS,
    GROUP_LABELS,
    GROUP_MAX_TABS,
    GROUP_MODELS,
    GROUP_OPTIONS,
    KIMI_MODEL_OPTIONS,
    PICK_OTHER,
    PICK_SKIP,
    PICK_TYPE_CUSTOM,
    PICK_USE_DEFAULT,
    PICK_USE_SUGGESTED,
    PROMPT_GROUPS,
    ROLE_BLURBS,
    SCOPE_SHAPE_LINKED,
    SCOPE_SHAPE_NO_ANSWERS,
    SCOPE_SHAPE_UNLINKED,
    S_ABORTED,
    S_ANALYSIS_TARGET,
    S_ANALYSIS_TARGET_PICK,
    S_ANTIGRAVITY_MODEL,
    S_APPROVED_PLAN,
    S_APPROVED_PLAN_PICK,
    S_APPROVE_PLAN_CONFIRM,
    S_BASE_REF_PICK,
    S_BASE_REF_TEXT,
    S_BRIEF_CARRY,
    S_BRIEF_KEEP,
    S_BRIEF_PATH,
    S_BRIEF_PATH_PICK,
    S_CLARIFICATION,
    S_CLARIFICATION_PICK,
    S_CLAUDE_MODEL,
    S_CODEX_MODEL,
    S_CONFIRM,
    S_CRITIC_PICK,
    S_CRITIC_TEXT,
    S_DEFAULTS_OR_CUSTOM,
    S_DESIGN_PREP_CONFIRM,
    S_DESIGN_PREP_DECISION,
    S_DESIGN_PREP_OVERRIDES,
    S_DIRECTIVE,
    S_DIRECTIVE_PICK,
    S_DONE,
    S_EDIT_TARGET,
    S_EXECUTOR,
    S_EXECUTOR_MODEL,
    S_FEATURE_EVIDENCE,
    S_FEATURE_EVIDENCE_PICK,
    S_FIX_CYCLE_CONFIRM,
    S_GROK_MODEL,
    S_HANDOFF_STAGE_PICK,
    S_KIMI_MODEL,
    S_LEAD_MODEL,
    S_PROJECT_EVIDENCE,
    S_PROJECT_EVIDENCE_PICK,
    S_PR_TEMPLATE,
    S_PR_TEMPLATE_PICK,
    S_PR_TEMPLATE_SCOPE,
    S_RELATED_TASKS,
    S_RELATED_TASKS_PICK,
    S_REPORT_WRITER_MODEL,
    S_REUSE_PREVIOUS,
    S_REVERIFY_SCOPE_PICK,
    S_REVERIFY_SCOPE_STAGES,
    S_SELECTED_DIRECTION_PICK,
    S_STAGE_PICK,
    S_TASK_GROUP,
    S_TASK_GROUP_TEXT,
    S_TASK_ID,
    S_TASK_ID_TEXT,
    S_TASK_PICK,
    S_TASK_TYPE,
    S_TASK_TYPE_TEXT,
    S_WORKERS_CUSTOM,
    S_WORKERS_OVERRIDE,
    TASK_PICK_NEW_TOKEN,
    TASK_TYPES,
    TASK_TYPE_VALUES,
)
from .state import (
    Option,
    Prompt,
    Step,
    WizardError,
    WizardState,
)
from .roles import (
    next_role_prompt,
)
from .statefile import (
    load_state_file,
    save_state_file,
)
from .confirmation import (
    confirmation_block,
)
from .registry import (
    STEPS,
    STEP_BY_ID,
)
from .engine import (
    init_state,
    next_prompt,
    prompt_payload,
    submit,
)
from .render import (
    render_args,
    render_role_args,
)
from .outcome import wizard_outcome
from .cli import (
    main,
)
