Skip to content

[Feature] Scheduled next-day recovery feedback prompt #89

@shchukins

Description

@shchukins

Parent

Part of #82 Unified Subjective Feedback Model.

Related to:

Idea

Automatically send next-day recovery feedback prompts after relevant training days.

The current system supports:

  • manual recovery prompt triggering
  • Telegram recovery feedback collection
  • idempotent recovery feedback persistence

But prompt delivery still requires a manual debug endpoint call.

This feature introduces scheduled orchestration for longitudinal recovery feedback collection.

Problem

Without automated prompt scheduling:

  • users forget to provide recovery feedback
  • longitudinal subjective dataset becomes sparse
  • delayed recovery signal quality decreases
  • readiness calibration becomes weaker
  • recommendation validation quality decreases

Manual triggering is acceptable for debugging but not for production data collection.

Proposed solution

Introduce a scheduled recovery feedback workflow.

Every morning:

  1. identify users with relevant previous-day training load
  2. check whether next-day recovery feedback already exists
  3. check whether recovery prompt was already sent
  4. send lightweight Telegram recovery prompt
  5. persist prompt delivery state

Prompt UX

Example:

How recovered do you feel today?

😴 Exhausted
😐 Tired
🙂 Okay
⚡ Fresh
🚀 Very fresh

Core UX principles:

  • one tap
  • optional participation
  • low friction
  • high longitudinal consistency

Scheduling behavior

Suggested initial logic:

Run daily scheduler at configurable morning time.

For each user:

Send prompt only if:

  • previous day contains relevant training load
  • or previous day contains activities
  • and no recovery feedback exists yet
  • and prompt was not already sent

Requirements

  • at most one recovery prompt per day
  • idempotent scheduling behavior
  • no duplicate Telegram prompts
  • timezone-aware scheduling support
  • configurable quiet hours/fallback timing
  • support future event-driven sync workflows
  • persist prompt delivery metadata

Suggested persistence

Possible new table:

subjective_feedback_prompt_log

Suggested fields:

  • user_id
  • prompt_type
  • target_date
  • sent_at
  • source
  • delivery_status
  • telegram_message_id
  • created_at

Future integration

This scheduler should later integrate with:

  • HealthKit freshness-aware morning briefing
  • event-driven sync workflows
  • recommendation engine calibration
  • adaptive prompt timing
  • notification fatigue prevention
  • multi-channel feedback collection

Acceptance criteria

  • scheduler runs automatically
  • recovery prompts are sent after training days
  • duplicate prompts are prevented
  • users without recent load do not receive prompts
  • repeated button taps update existing feedback
  • prompt delivery state is persisted
  • logs and tests cover scheduling/idempotency behavior
  • documentation updated

Out of scope

  • ML-based adaptive scheduling
  • iOS push notifications
  • conversational feedback flows
  • sport-specific second-tap feedback
  • notification prioritization engine

Complexity

Medium.

Value

Very high.

Automated longitudinal recovery feedback collection is critical for:

  • readiness calibration
  • adaptation modeling
  • prediction validation
  • future ML dataset quality

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions