Files
wristivo/Adapters/MotionCapture/INTEGRATION-PROPOSAL.md
T

1.9 KiB

Historical agent handoff. The integrated composition and current test status are documented in docs/FIRST-DEVICE-PROTOTYPE.md and docs/VALIDATION.md. Proposed wiring below has been incorporated or superseded.

MotionCapture integration proposal

Owner: workstream C (feat/wrist-motion).

This change introduces a watch-only adapter boundary without changing the RemoteCore envelope. MotionCaptureService emits GestureCore.GestureRecognition values (semantic RemoteCommand, confidence, and a local monotonic timestamp) to the watch shell. It never creates envelopes, carries TV identity, or retries commands.

Proposed target membership

The integrator should add Adapters/MotionCapture/Sources/MotionCapture/*.swift to a watchOS-only target that depends on the GestureCore package product. The pure classifier and its tests remain in Packages/WristivoKit and therefore build on macOS/iOS/watchOS. Core Motion must not be imported by the package.

Lifecycle and permission contract

The watch shell calls start(sessionID:) only after calibration and explicit foreground arming. stop(reason:) is idempotent and must be called for scene inactivity, relay loss, target/session changes, expiry, cancellation, or sensor failure. A subsequent start creates a fresh neutral baseline. Hardware availability and start-handler failures are surfaced as typed errors; no permission denial is treated as an empty sample stream. The watch target needs the platform's truthful motion purpose string in its host configuration.

Migration and tests

No wire/schema migration is required. Existing watch code can initially ignore the new service and continue using touch controls. The integrator must add the watch target membership and motion purpose string, then run the package tests and a physical permission/foreground suspension check. Simulator and synthetic traces validate logic only; no hardware recognition claim is made by this workstream.