What problem does it solve? Hand-editing six interdependent learner JSON databases (learner-profile, progress, mistakes, mastery, spaced-repetition, session-log) at the end of every practice session is error-prone and causes silent desync between streaks, session logs, mastery, and accuracy records. ## Core Features & Use Cases - Atomic multi-database writes: Pipe one JSON payload to update-db.py, which validates the payload, creates pre-write backups, and applies all changes via .tmp + fsync + rename. - Spaced-repetition queue rebuild: Runs SM-2 on review_results and regenerates the review queue from scratch on every run. - Use Case: After a /fluent-review session with 5 vocabulary and grammar items, send one payload containing review_results, errors, and skill_scores to persist everything, bump streaks, and record milestones in a single call. ## Quick Start At the end of a practice session, run update-db.py with a JSON payload containing the session_id, date, and any errors, new vocabulary, or review results to persist.