{"id":19285,"plugin_id":"plugins_6a9640cc19b48191803511c8af5553e7","kind":"skill","collection_source":null,"comparison_source":null,"observed_at":"2026-09-30T23:15:27.199Z","digest":"1e364d2464ad4bc56c7d7bec74e5ac3f5ca0a5d3908063d1c8fea6a07d0ed559","against":null,"payload":{"name":"fitness-sync","description":"Reconcile workout and activity-source snapshots into deterministic, provenance-preserving fitness facts in ChatGPT Library files; use for validation, rest-day checks, and source conflicts.","included_files":[{"relative_path":"agents/openai.yaml","size_in_bytes":97},{"relative_path":"scripts/combined_sync.py","size_in_bytes":1866},{"relative_path":"scripts/fitness_sync.py","size_in_bytes":9781}],"skill_md_contents":"---\r\nname: fitness-sync\r\ndescription: Reconcile workout and activity-source snapshots into deterministic, provenance-preserving fitness facts in ChatGPT Library files; use for validation, rest-day checks, and source conflicts.\r\n---\r\n\r\n# Fitness Sync\r\n\r\nUse this skill to normalize and reconcile workout and activity snapshots that the user provides or has already connected. Persist raw observations, normalized fitness facts, and diagnostics in the user's ChatGPT Library files. It is source-agnostic: connectors remain outside this plugin.\r\n\r\n## Library-native persistence\r\n\r\n- Resolve the selected or canonical Library fitness files before reading or mutating them.\r\n- Read the complete relevant source snapshots and current canonical fitness data before reconciliation.\r\n- Replace the same canonical Library file identity after validation; never create a second “latest” file for an ordinary sync.\r\n- Preserve raw source observations, source completeness, coverage windows, stable IDs, conflicts, and audit history in the Library record.\r\n- If the canonical fitness file is absent, ask whether to initialize one in Library. Do not write to local paths or assume a private database.\r\n\r\n## Core rules\r\n\r\n- Preserve raw source observations; do not fabricate a source value or treat absence as deletion.\r\n- Require stable workout IDs, valid dates, non-negative measurements, and unique set identities.\r\n- A complete zero-result workout pull is valid and must not delete prior canonical workouts.\r\n- Reconcile by stable workout ID; classify records as new, updated, or unchanged.\r\n- Do not add overlapping activity totals from different sources.\r\n- Manual overrides outrank automated sources. Configure automated precedence explicitly for each deployment and retain conflicts as diagnostics.\r\n- Reject incomplete, truncated, or future-dated activity responses before publishing a derived daily fact.\r\n\r\n## Deterministic helpers\r\n\r\nThe bundled Python helpers validate and reconcile fixtures without network access and are retained as offline developer/test references. The ChatGPT runtime should use Caliber and Apple Health when those sources are connected, or reconcile user-provided snapshots when they are not; in either case, persistence uses Library reads/replacements and must not depend on launching a local process.\r\n\r\n## Scheduled combined synchronization\r\n\r\nThe nutrition ledger's initialization contract owns the daily schedule in `sync.daily_sync_time_local`, defaulting to `23:55` local time. The scheduler must use the persisted IANA timezone and invoke `run_combined_sync` at that local wall-clock time. Every run pulls nutrition, Caliber workouts, Apple Health workouts, and Apple Health activity; it must emit a clear success or failure result even when no workouts exist. A successful run records its completion; an incomplete source response blocks publication. This is an orchestration contract for the host application: installing this skills-only plugin does not itself create an operating-system or ChatGPT automation.\r\n\r\nUse the helpers with fixtures first. Add live connectors only outside this skills-only package, with separate authentication and privacy review.\r\n\r\n## Safety boundary\r\n\r\nDo not infer health conditions or prescribe medical treatment from workout/activity data. Keep source provenance and uncertainty visible whenever data is incomplete or conflicting.\r\n\r\nUse the nutrition skill's [Library persistence contract](../nutrition-ledger/references/library-contract.md) for version-safe canonical-file reads and replacements. Fitness synchronization follows the same no-partial-write rule: if a source check, validation, reconciliation, or Library replacement fails, publish no derived fitness facts.\r\n"},"changes":[],"summary":"First saved snapshot. No earlier version is available for comparison.","summary_kind":"deterministic","summary_metadata":{}}