An iOS alarm that verifies you're actually awake using Claude Opus 4.7 vision. A self-commitment device, not a sleep tracker. Future-you can't cheat past-you's contract.
Built for the Cerebral Valley × Anthropic "Built with Opus 4.7: a Claude Code hackathon" (Apr 21–26, 2026).
iOS Clock alarms can be dismissed with a thumb on the lock screen, eyes still closed, body still horizontal. Third-party "alarm" apps give you a math puzzle you solve in bed. None of them prove you're out of bed.
- Onboarding — user takes a baseline photo at their designated awake-location (kitchen, bathroom sink, desk lamp).
- Alarm rings — keeps ringing. Only way to silence it is to take a new live photo.
- Verification — Claude Opus 4.7 compares new photo to baseline: same location, eyes open, upright, room lit, appears alert.
- Anti-spoofing — retries add random action prompts: "blink twice", "show your right hand".
- Fail — alarm continues escalating. No dismiss button.
This is not a classification task a smaller model can handle reliably. It needs:
- Vision comparing two photos for location consistency
- Reasoning over whether the scene suggests wakefulness (body posture, eye openness, lighting)
- Insight generation from accumulated wake-up patterns across nights
A single Opus 4.7 call does the work that would otherwise need three specialized models stitched together.
- iOS: Swift + SwiftUI, iOS 17+
- AI: Claude Opus 4.7 (vision verification, insight generation); Claude Sonnet 4.6 (non-vision text, cost-sensitive paths)
- Storage: SwiftData local-first. No backend required to run the demo.
- Audio: Foreground audio session + critical alert notifications (Alarmy-style workaround — iOS has no public Alarm API).
🛠 In active sprint. Submission deadline Apr 26 8:00 PM EDT (Apr 27 8:00 AM HKT).
- Clone this repo
- Open
WakeProof.xcodeprojin Xcode 15+ - Add your Claude API key to
WakeProof/Secrets.swift(not committed — seeSecrets.swift.example) - Select a physical iOS device (simulator does not support background audio behaviour reliably)
- Build & run
All Swift in this repo was generated and refined through Claude Code sessions guided by CLAUDE.md. See that file for project context if you're exploring with Claude Code yourself.
MIT — see LICENSE.