What's new
3 new tools (12 total)
get_opening_theory— fetch key ideas, main continuations, and win stats for any opening by FEN or name (via Lichess Explorer)find_opening_gaps— replay your stored games to find positions where you're repeatedly surprised by opponent deviationsgenerate_puzzles— extract tactical puzzles from your own games, filtered by difficulty and type
Bug fixes
- JSONB double-encoding:
insertAnalysisusedJSON.stringify()which postgres.js re-serialized as a JSONB string instead of an array —move_recordsandcritical_momentswere silently returning[]for every game. Fixed withdb.json(). - NUMERIC coercion: postgres.js returns
NUMERIC(5,2)as strings ("0.00"), breakingwhite_accuracy === 0comparisons. Fixed at the store layer. - Identical style fingerprints: all users got the same scores because the above two bugs left
critical_momentsandmove_recordsempty for every analysis. - Tactical sharpness formula: looked for
eval_drop_cp < 30but the pipeline only stores drops ≥ 50 —foundwas always 0. Threshold changed to< 200(not a blunder = success). - Aggression multiplier: was
× 20, producing scores of 2–10 that never reached the 40/70 label thresholds. Changed to× 200. - Style label routing: added
Tactical FighterandCautious Strategist— previously everyone with low aggression fell through to "Solid Positional Player". - Result format mismatch:
scoreEndgameSkillanddetectEndgameTechniqueIssuecompared against"1-0"/"0-1"but the DB stores"win"/"loss"/"draw". - Auto re-queue:
refresh_gamesnow automatically re-queues analyses that ran before Stockfish was warm (zero accuracy scores).
What's Changed
- Add Contributor Covenant Code of Conduct by @rutvij26 in #74
- feat: add get_opening_theory, find_opening_gaps, generate_puzzles (v0.7.0) by @rutvij26 in #75
- fix: JSONB double-encoding, identical style fingerprints, and broken style scoring by @rutvij26 in #77
Full Changelog: v0.6.0...v0.7.0