콘텐츠로 이동

doctor.py

pilot doctor — workspace / project 정합성 검사.

본 파일은 thin dispatcher. 실제 검사 로직은 tools/doctor/ 패키지에 있다.

  • default 모드 → doctor.integrity.run_integrity_check
  • --fix → 위에 포함 (run_integrity_check 인자)
  • --schema → doctor.schema.run_schema_check

진단 모드(과거 --diagnose)는 스크립트 없이 skills/pilot-doctor/SKILL.md § 진단 모드 지시문이 모델 판단으로 직접 수행한다 (근거: repo 루트 docs/audits/2026-07-24-audit-4-python.md § C-6).

Usage: python3 doctor.py [WORKSPACE_PATH] [--project PROJECT] [--fix] python3 doctor.py --schema

패키지 함수를 직접 테스트하려면 doctor.integrity·doctor._common 을 sys.path 경유로 직접 import 한다 (본 파일은 더 이상 wildcard-style backward-compat re-export 를 제공하지 않는다 — tests/tools/test_doctor_conventions.py 참조).

소스: tools/doctor.py