# Motorcycle Body Position Analyzer

Local macOS Swift/Vision photo analysis. Never publish private photos or derived photo artifacts. `data/` and `artifacts/` are ignored. Preserve originals and watermarks.

## Authority

Plan: `../docs/plans/2026-09-14-0936-feat-track-day-body-position-plan.md` in the parent projects repository. Begin with U1 feasibility; do not claim successful coaching based on a plausible skeleton. No per-joint 3D confidence is supplied by Vision. A 2D correction never recovers hidden depth.

## Local Tools

- `scripts/swift.sh test`: package tests with a full Xcode toolchain and project-local module caches.
- `scripts/swift.sh run pose-batch`: local analysis CLI (see its usage).

## Testing

Core tests live in `Tests/PoseCoreTests`. Deterministic geometry and data logic use failing tests before implementation. Real Vision tests are opt-in via `POSE_PRIVATE_MANIFEST` and must explicitly skip when absent. Original-source annotations are prepared before inspecting model results. Synthetic tests must not depend on private photos.

## Algorithm Notes

Pixel coordinates use top-left origin. Vision normalized points use bottom-left origin. Map crop points back through the recorded crop origin; never confuse image-left with anatomical left. Angles are in degrees. Visibility annotations are reference evidence, not inferred anatomical ground truth. Preserve raw detections separately from corrections.

## Automatic provisional photo coaching

Whenever new subject track-day photos are added or provisional coaching is authored/refreshed, automatically apply [the whole-body checklist](docs/coaching-checklist.md) to every subject, without requiring James to repeat the topics. Inspect the actual image and identify the assigned subject, then record every topic as a visible focus, observation, rider hypothesis, unassessable, or not applicable, with an explanation. Do not finish a coaching sweep with silently omitted or pending topics. Use the shared catalog in `Sources/PoseCore/CoachingChecklist.swift`; preserve source bindings and existing joint/lean evidence. Run `pose-batch audit-coaching <session.json> <results.json>` for each affected session. Future imports get the checklist automatically in the app; photo-specific findings require this visual assessment, not skeleton-based guessing.
