Prompt file imported from and3rn3t/health (
.github/prompts/detect-config-drift.prompt.md). Copyright stays with the author.
Check for configuration drift between web and iOS health analysis configs.
Config Locations
Gait Analysis:
- Web source:
src/lib/gaitConfig.ts - iOS target: Generated Swift code via
scripts/analysis/gait/sync-gait-config.js - Sync command:
pnpm run gait:sync
Fall Risk:
- Web source:
src/lib/fallRiskConfig.ts - iOS target: Generated Swift code via
scripts/analysis/fall/sync-fall-risk-config.js - Sync command:
pnpm run fallrisk:sync
Procedure
- Read web configs: Extract threshold values, scoring weights, version numbers, and algorithm parameters from
gaitConfig.tsandfallRiskConfig.ts - Read iOS configs: Find the corresponding Swift files in
ios/that contain the same parameters - Compare values: Check each threshold, weight, and version for exact match
- Check sync script output: Run
pnpm run gait:sync -- --dry-runandpnpm run fallrisk:sync -- --dry-run(if dry-run supported) to see what would change - Report drift: List any mismatched values with web vs iOS values side-by-side
Output Format
| Parameter | Web Value | iOS Value | Status |
|---|---|---|---|
| gaitAnalyticsVersion | X | Y | DRIFT / OK |
| fallDetectionThreshold | X | Y | DRIFT / OK |
| ... | ... | ... | ... |
If drift is detected, provide the sync commands to resolve it:
pnpm run gait:sync && pnpm run fallrisk:sync
Then verify by re-reading both configs.