Complete Specification & Motivations
MVP Specification (original)
| Component | Status | Notes |
|---|---|---|
| iOS App Foundation | โ Started | SwiftUI + SwiftData scaffolding in place |
| Core Architecture | ๐ Designed | See "Complete Specification" |
| HealthKit Integration | โณ Pending | Implement anchored queries, observer queries |
| Anomaly Detection | ๐ Designed | Logic documented, pending implementation |
| Sync Monitoring | ๐ Designed | Background thread model defined |
| UI Dashboard | โณ Pending | Wireframes in Complete Specification |
| Data Export | ๐ Designed | Format specs ready |
| macOS Companion | ๐ Future | Post-MVP enhancement |
The Problem: Apple Health data loss events (confirmed September 2025, ongoing sporadic reports) lack any detection mechanism. Users don't know their data has been lost, corrupted, or silently modified.
Concrete Examples: - Historical insertions: Workouts from 6+ months ago suddenly appearing - Silent deletions: Multi-week gaps with no deletion notification - Duplicates: Same workout syncing multiple times across devices - Divergence: Metrics (steps, energy, HR) drifting without user action
See Complete Specification ยง 2 for detailed observed cases and forensic implications.
Implement HealthKit Integration (Sources/HealthKitMonitor.swift)
HKAnchoredObjectQuery for efficient incremental queriesHKObserverQuery for real-time change notificationsBuild Anomaly Detection (Sources/AnomalyDetector.swift)
Implement Sync Monitoring (Sources/SyncMonitor.swift)
Create UI Dashboard (Views/HealthStatusView.swift)
| Decision | Rationale |
|---|---|
| Read-only + HealthKit | Never modify health data; pure observation only |
| Local-first storage | Full functionality without internet; privacy-first |
| SwiftData | Efficient local persistence, encrypted by iOS |
| Anchored queries | Minimize HealthKit load, reduce battery impact |
| Separate sync thread | Non-blocking, responsive UI during background work |
| Aggregated digests only | CloudKit sync respects privacy, no raw samples exported |
HealthProbe: Guarding the integrity of your health data.