Frozen for MVP implementation.
This document defines the behavior that Phase 2 code generation must follow.
Collocation Coach is a Telegram bot that helps Russian-speaking English learners sound more natural by sending a short daily collocation lesson with review.
- Russian-speaking learner
- English level A2-B2
- studies regularly but struggles with natural word combinations
- wants a 2-3 minute daily habit, not a long study session
Each day the bot sends:
- 3 new collocations from the next lesson unit
- up to 2 review collocations from prior weak items
- short explanation in Russian
- one correct example
- one common mistake
- one quick multiple-choice practice step
- Telegram bot
- onboarding
- daily lesson scheduling
- one active lesson per day
- self-rating after each item
- simple spaced repetition
/today,/review,/settings- file-based lesson content in YAML
- self-hostable open-source setup
- AI chat
- audio or voice
- free-text answer checking
- admin web panel
- gamification system
- streak economy
- mobile app
- collaborative or social features
- Intro message
- Review block with up to 2 items
- New block with exactly 3 items
- Completion message with short summary
If the review queue is empty, the lesson still runs with only 3 new items.
Each item is shown in this order:
- Collocation card
- target phrase
- Russian translation
- short explanation
- correct example
- common mistake or contrast
- Practice prompt
- one multiple-choice question
- 3 answer options
- exactly 1 correct option
- Feedback
- correct answer
- short reason
- Self-rating
KnowUnsureRepeat
/start/today/review/settings/help
For a new user:
- Welcome message
- Level choice:
A2-B1B1-B2
- Timezone choice
- default from Telegram locale when available
- fallback to
DEFAULT_TIMEZONE
- Daily delivery time choice
- fixed buttons:
09:00,13:00,19:00,21:00
- fixed buttons:
- Confirmation message
For an existing user:
- shows current settings and suggests
/todayor/settings
- returns the current day's lesson if it exists
- if already completed, returns the lesson summary
- if today's lesson has not yet been generated, generates it
- starts a short review-only session
- pulls up to 5 due review items
- if no items are due, explains that review queue is empty
Allows updating:
- level band
- timezone
- delivery time
Explains:
- what the bot does
- what
Know,Unsure, andRepeatmean - available commands
MVP review scheduling is intentionally simple.
Know- mark item successful
- next due interval grows
Unsure- mark item weak
- next due tomorrow
Repeat- mark item difficult
- next due in the next review session
- first successful review:
+3 days - second successful review:
+7 days - third and later successful review:
+14 days Unsure:+1 dayRepeat: same day if there is remaining review capacity, otherwise+1 day
The bot must keep the algorithm configurable in code, but Phase 3 should start with these exact defaults.
Lesson content is stored as YAML lesson units.
Each lesson unit contains:
- metadata
- exactly 3 new collocation items
Review items are not authored inside the lesson unit. They are selected dynamically from user progress.
The canonical content example for Phase 2 is:
Phase 2 storage must support these entities.
idtelegram_user_idusernamefirst_namelanguage_codelevel_bandtimezonedaily_delivery_timeis_activecreated_atupdated_at
idexternal_keylevel_bandday_numbertopicsource_pathcreated_at
idlesson_unit_idexternal_keyphrasetranslation_ruexplanation_rucorrect_examplecommon_mistakepractice_promptcorrect_optionwrong_option_1wrong_option_2tags
iduser_idlesson_datelesson_unit_idstatuscreated_atcompleted_at
iddaily_lesson_idcollocation_item_iditem_type(neworreview)positionanswer_selectedanswered_correctlyself_ratinganswered_at
iduser_idcollocation_item_idtimes_seentimes_correctlast_seen_atlast_ratingstability_stagedue_atcreated_atupdated_at
iduser_idscheduled_forstatusattempt_countlast_errorcreated_atupdated_at
The bot must emit or log these events:
user_startedonboarding_completeddaily_lesson_generateddaily_lesson_starteditem_answereditem_rateddaily_lesson_completedreview_session_startedreview_session_completedsettings_updateddelivery_attempteddelivery_succeededdelivery_failed
Required:
APP_ENVTELEGRAM_BOT_TOKENDATABASE_URLDEFAULT_LOCALEDEFAULT_TIMEZONE
Optional for MVP:
LOG_LEVELCONTENT_DIRDELIVERY_BATCH_SIZE
The public repository must include:
- sample lesson files
.env.example- Docker-based local run path
- no committed secrets
- clear setup docs
Phase 1 is complete when:
- lesson flow is explicit
- commands are fixed
- review algorithm defaults are fixed
- storage entities are defined
- content file structure is defined
- required environment variables are defined
- there are no blocking product ambiguities for Phase 2
- stack: Python + aiogram + PostgreSQL
- runtime mode: polling first
- launch locale: Russian explanations for all lesson content
- level bands at launch:
A2-B1andB1-B2 - daily delivery options at launch: fixed times, not free-form input