Repository navigation
Implement sprint-based microstud 8000 ying with study-ahead fill - #20
Merged
Merged
Conversation
When a child finishes their daily queue, offer an immediate follow-up session drawing on soon-due cards (FSRS handles early reviews natively) plus an optional bonus of new cards, gated by new per-profile parent controls. The plan targets cardbrick-py and calls out the legacy Rust app as out of scope. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BpqXQKjiwd3ogsmumtDe2j
The app is for microstudying: a daily card goal (e.g. 150) done in 5-10 minute sprints across the day. The plan now derives a visible sprints-remaining count from the review log, lets back-to-back sprints burn it down (going ahead), fills sprints from soon-due cards when the due pool runs dry before the goal, and offers bonus sprints after the goal is met. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BpqXQKjiwd3ogsmumtDe2j
The study day is now a card goal (daily_goal_cards, default 150) chipped away in short sprints instead of one capped sitting: - ReviewService.sprint_status derives cards done / sprints remaining from the review log; going ahead (back-to-back sprints) burns the count down the same as spacing them out. - get_due_cards budgets each sprint by the goal, keeps daily_new_cards as new-card pacing, retires daily_review_cards from queue math, and tops sprints up with soon-due cards pulled forward (ahead_candidates, bounded by study_ahead_days) when the due pool runs dry. - After the goal is met the start and summary screens offer an optional bonus sprint; the summary's bottom button rolls straight into the next sprint, and the review header shows Sprint n/N. - Parent Mode's limits screen edits the goal and sprint size (with a live sprint count preview); the profile CLI gains --daily-goal, --sprint-cards/--sprint-minutes, --study-ahead-days, --study-ahead. - Schema v5 adds daily_goal_cards, study_ahead_days, study_ahead_enabled, seeding the goal from the old review+new caps on migration. Covered by tests/test_study_ahead.py (sprint math, ahead fill, FSRS early review, bonus drain, migration) and a reworked test_limits.py; verified end-to-end by driving the pygame UI headlessly through two goal sprints, a bonus sprint, and the all-done screen. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BpqXQKjiwd3ogsmumtDe2j
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Refactor CardBrick's study model from a single daily queue to a sprint-based microstudying system where children chip away at a daily card goal in short 5–10 minute sprints. When the due pool runs dry before the goal is met, sprints are topped up with soon-due cards pulled forward ("studying ahead"), and an optional bonus sprint is offered after the goal is reached.
Key Changes
Storage & Migration
daily_goal_cards(default 150),study_ahead_days(default 1),study_ahead_enabled(default 1)daily_goal_cardsfrom olddaily_review_cards + daily_new_cardsfor existing profilesahead_candidates()query to fetch cards due soon (within the study-ahead horizon) for pull-forward filldaily_answer_count()to track total answers logged today (not unique cards), which drives the goal budgetService Layer
daily_review_cardscap withdaily_goal_cardsin queue building; new cards still paced bydaily_new_cardssprint_status()helper returning{cards_done, cards_remaining, sprints_remaining, sprints_planned, next_sprint_cards, bonus_cards, goal}— all derived from the append-only review logget_due_cards()to acceptbonus=Trueflag (ignores goal budget for optional bonus sprints after goal is met)counts_for_queue()to support bonus modeUI (app.py)
screen_child_startfrom "X cards today" to "N sprints to go" with progress bar (cards_done / goal)_sprint_label("Sprint 3/8" or "Bonus sprint") displayed in review headerscreen_review()to compute and display sprint numberbonus=TruetoStudySessionwhen starting a bonus sprintscreen_deck_select()to query counts with bonus flagSession & CLI
bonusparameter toStudySession.__init__()(passed through to queue building)--daily-review, add--daily-goal, rename--session-cards/--session-minutesto--sprint-cards/--sprint-minutes, add--study-ahead-daysand--study-ahead(on/off)Tests
test_study_ahead.py) covering:sprints_remaining; caps never block while goal unmetdue > now; Again requeues within sprintdaily_goal_cardsNotable Implementation Details
https://claude.ai/code/session_01BpqXQKjiwd3ogsmumtDe2j