Document spec gaps: auth, phase scaling, observability, testing
Address 21 previously undefined behaviors across specs: - Authentication: Replace email/password with OIDC (Pocket-ID) - Cycle tracking: Add fixed-luteal phase scaling formula with examples - Calendar: Document period logging behavior (preserve predictions) - Garmin: Clarify connection is required (no phase-only mode) - Dashboard: Add UI states, dark mode, onboarding, accessibility - Notifications: Document timezone batching approach - New specs: observability.md (health, metrics, logging) - New specs: testing.md (unit + integration strategy) - Main spec: Add backup/recovery, known limitations, API updates Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -55,6 +55,31 @@ Generates new `calendarToken`, invalidating previous subscriptions.
|
||||
}
|
||||
```
|
||||
|
||||
### Period Logging Behavior
|
||||
|
||||
When a user logs a new period start date, the ICS feed updates as follows:
|
||||
|
||||
1. **Current cycle**: Phase events are corrected retroactively to reflect actual dates
|
||||
2. **Original predictions preserved**: Previous predictions for the current cycle are kept as separate events with "(Predicted)" suffix, allowing users to compare predicted vs. actual
|
||||
3. **Older cycles**: Events from previous cycles remain unchanged
|
||||
4. **Future cycles**: Regenerated based on new period date and cycle length
|
||||
|
||||
**Example after logging period on Day 28 of a predicted 31-day cycle:**
|
||||
```ics
|
||||
BEGIN:VEVENT
|
||||
SUMMARY:🩸 Menstrual (Days 1-3)
|
||||
DTSTART;VALUE=DATE:20240128
|
||||
DESCRIPTION:Actual period start
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
SUMMARY:🩸 Menstrual (Predicted)
|
||||
DTSTART;VALUE=DATE:20240131
|
||||
DESCRIPTION:Original prediction - period arrived 3 days early
|
||||
END:VEVENT
|
||||
```
|
||||
|
||||
This creates a built-in accuracy feedback loop for understanding cycle patterns.
|
||||
|
||||
## In-App Calendar
|
||||
|
||||
### Month View (`/calendar`)
|
||||
@@ -107,6 +132,8 @@ Below calendar:
|
||||
- [ ] ICS contains events for next 90 days
|
||||
- [ ] Invalid token returns 401
|
||||
- [ ] Regenerate token creates new unique token
|
||||
- [ ] Period log updates current cycle events retroactively
|
||||
- [ ] Period log preserves original predictions as "(Predicted)" events
|
||||
- [ ] Month view renders all days in month
|
||||
- [ ] Day cells show correct phase colors
|
||||
- [ ] Today is visually highlighted
|
||||
|
||||
Reference in New Issue
Block a user