#!/usr/bin/env python3
"""dispatch.py — 호환 shim (task-2388 Phase ε).

dispatch.py 4336줄이 dispatch/ 패키지 6 모듈로 분리되었다.
이 파일은 외부 호출자 호환을 위한 얇은 shim:
- `python3 dispatch.py --team ... --task-file ...` 스크립트 실행 진입점
- `import dispatch`는 패키지(dispatch/__init__.py)를 우선 로드하므로 영향 없음

분리 모듈:
- dispatch/_state.py: 상수 + optional imports + logger
- dispatch/task_id.py: task-2380 4-layer fix
- dispatch/retry.py: task-2387 status 가드
- dispatch/prompt.py: task-2386 슬림 prompt
- dispatch/audit.py: bot_pool + allowed_resources + capability + affected_files + warnings + team
- dispatch/core.py: dispatch + cancel + main + composite + PRD
"""

from __future__ import annotations

import sys
from pathlib import Path

# dispatch/ 패키지가 import 가능하도록 부모 디렉토리를 sys.path에 등록
_REPO_ROOT = Path(__file__).resolve().parent
if str(_REPO_ROOT) not in sys.path:
    sys.path.insert(0, str(_REPO_ROOT))

from dispatch.core import main  # noqa: E402

if __name__ == "__main__":
    main()
