feat: add sticky error-aware key mastery

Persist ranked-only mastery and use it consistently across progression, milestones, counts, and localized UI. Preserve mastery during history rebuilds, replay errors accurately, and generate replay-derived test profiles. Document the follow-up plan to remove the drill history cap.
This commit is contained in:
2026-08-12 01:09:52 -04:00
parent 0f8493eb02
commit 5daa644d3b
47 changed files with 2683 additions and 722 deletions
@@ -1,5 +1,7 @@
# Skill Tree Milestone Popups
> **Note (2026-04-18):** "Mastery" is now a persistent `mastered: bool` bit gated on speed (`confidence >= 1.05`) + samples (`>= 20`) + error-rate EMA (`<= 0.05`) — see `docs/plans/2026-04-18-sticky-key-mastery-with-error-aware-promotion.md`. Milestone popups key off the sticky bit, so each key/branch fires at most once. Statements below referencing "at full confidence" or "confidence >= 1.0" are historical.
## Context
When users reach major skill tree milestones, they should see celebratory popups explaining what they've achieved and what's next. Four milestone types: