scid::core::Position is the mutable board-state aggregate. It owns the board array, piece and material indexes, side to move, castling rights, en-passant target, move counters, and hash values. Move generation, legality checks, move application, undo, FEN/UCI parsing, and SAN formatting all resolve through that state.
The aggregate view is the compact map of the position-facing API. Text formats such as FEN, UCI position strings, coordinate moves, SAN, and legacy board strings sit outside the aggregate. Position turns portable move requests into position-resolved actions, updates its internal indexes when moves are applied or undone, and exposes derived facts such as legal replies, check, mate, material and hashes.
This diagram expands the position map into the main public types that sit around board state and legal move handling. It is intentionally loose: it shows the types programmers meet when using Position, while omitting private helper functions, attack tables and most low-level board geometry constants.
MoveSpec is a portable request: it names origin, destination, promotion, and castling intent, but it cannot undo a move. Position resolves that request against the current board into a MoveAction, which carries captured pieces, castling rights, en-passant state and halfmove data needed for exact undo. MoveList is the fixed-capacity container filled by move generation.
Square collections are supporting structures rather than independent aggregates. SquareList is useful when callers need the actual attacking or checking squares; SquareSet is a compact membership filter used while generating moves. Primitive scalar aliases such as pieceT, colorT and squareT appear as field types rather than separate model nodes.