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 Progression System & Whitespace Support
> **Note (2026-04-18):** Mastery/progression gating has since moved from "confidence >= 1.0" to a persistent `mastered: bool` bit with a speed + samples + error-rate gate. See `docs/plans/2026-04-18-sticky-key-mastery-with-error-aware-promotion.md` for the authoritative rules. Statements below that equate confidence ≥ 1.0 with mastery are historical.
## Context
keydr currently tracks only a-z lowercase letters in its adaptive unlock system. Since keydr aims to be a coding-focused typing tutor, it must also train capitals, numbers, punctuation, whitespace (tabs/newlines), and code-specific symbols. The current flat a-z progression needs to be replaced with a branching skill tree that lets players choose their training path after mastering lowercase letters. Additionally, code drills currently strip newlines into spaces, making them unrealistic for real-world code practice.