add initial ADR and glossary

This commit is contained in:
2026-11-01 21:18:07 +01:00
parent ca4878055d
commit 6f08cdd10f
4 changed files with 164 additions and 0 deletions
@@ -0,0 +1,8 @@
# Tablebase via the lichess API instead of self-hosting
The trainer grades moves against Syzygy tablebases, but self-hosting them is not
possible yet, so we query the lichess tablebase API (`tablebase.lichess.ovh`)
over HTTP and cache responses. This couples the core play loop to a remote
service with rate limits (mitigated by a cooldown and an LFU cache), but avoids
the multi-terabyte 7-piece dataset and hosting cost until local tablebases are
viable.
@@ -0,0 +1,8 @@
# Client-authoritative move legality; server grades via tablebase
Moves are validated by chess.js on the client (which also renders the board);
the server never applies moves and trusts the client's FEN, only grading the
move against the tablebase. We chose this over server-side validation with Chex
because Chex's move-legality logic is immature, and the app is single-user with
no auth, so client tampering is not a threat. Revisit once the Chex fork is
fixed.