CycleStart with derived cycle day #10

Closed
opened 2026-08-26 09:14:04 +00:00 by GKaszewski · 0 comments
Owner

What to build

A CycleStart is a Date on which a User's menstrual period began. Recorded once per cycle, never per day. Cycle day for any Date is derived from the most recent preceding CycleStart and is never stored.

Storing cycle day as an integer — the original proposal — fails the same way storing moon phase would. It needs input every single day, which is the least consistently-trackable shape possible; a missed day is an unfillable hole; correcting a mis-remembered start date fixes nothing retroactively; and health providers export period records with dates, not cycle-day integers, so an import could never populate it.

Deriving it means one tap a month, no gaps, and a correction to a CycleStart repairs every Date that depends on it at once.

The feature is entirely optional and invisible unless the User turns it on.

Acceptance criteria

  • A User can record, edit, and delete a CycleStart on a Date
  • Cycle day is derived on read and never persisted
  • Correcting a CycleStart changes the derived cycle day for every affected Date
  • Dates before the first recorded CycleStart have no cycle day, and that renders sensibly
  • The feature is off by default and absent from the UI until enabled
  • Date resolution uses the rule from #2

Blocked by

## What to build A `CycleStart` is a `Date` on which a User's menstrual period began. Recorded once per cycle, never per day. Cycle day for any `Date` is derived from the most recent preceding `CycleStart` and is never stored. Storing cycle day as an integer — the original proposal — fails the same way storing moon phase would. It needs input every single day, which is the least consistently-trackable shape possible; a missed day is an unfillable hole; correcting a mis-remembered start date fixes nothing retroactively; and health providers export period records with dates, not cycle-day integers, so an import could never populate it. Deriving it means one tap a month, no gaps, and a correction to a `CycleStart` repairs every `Date` that depends on it at once. The feature is entirely optional and invisible unless the User turns it on. ## Acceptance criteria - [ ] A User can record, edit, and delete a `CycleStart` on a `Date` - [ ] Cycle day is derived on read and never persisted - [ ] Correcting a `CycleStart` changes the derived cycle day for every affected `Date` - [ ] Dates before the first recorded `CycleStart` have no cycle day, and that renders sensibly - [ ] The feature is off by default and absent from the UI until enabled - [ ] `Date` resolution uses the rule from #2 ## Blocked by - #2
GKaszewski added the ready-for-agent label 2026-08-26 09:14:04 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: GKaszewski/k-mood#10