Files
blind_chess/CLAUDE.md
T
2026-04-28 10:53:26 -04:00

2.4 KiB

blind_chess

Web-based two-player chess where each player sees only their own pieces; the server acts as moderator.

Start Here

Read the latest handoff first: .claude/handoffs/ (most recent file).

Then check DECISIONS.md for settled choices, and docs/superpowers/specs/2026-04-28-blind-chess-design.md for the full design spec.

Project Identity

A digitization of a battleship-style chess variant. Two players, separated; a moderator who sees both boards and announces a fixed vocabulary of events ("Black has moved and captured", "Moving that piece will not help you", "White is in check"). The physical version requires three people; this version replaces the moderator with a server. Ships with both vanilla mode (full reveal — normal chess) and blind mode (the variation) on day one. Mode is a per-player view filter on a shared engine, not a different game.

The system's most distinctive property: highlighting in blind mode reveals zero opponent information. It's computed purely from (piece type, position, own-piece set) — a function whose signature literally cannot read opponent state. The moderator vocabulary is the only legitimate channel for opponent events.

Current State

  • Phase: spec approved, ready to implement (planning next)
  • Repo: not yet (Gitea creation pending — see deferred steps in handoff)
  • Stack: Node 22 + TypeScript, Fastify + ws, Svelte + Vite, chess.js. pnpm workspace with packages/{server,client,shared}.
  • Deploy target: new LXC on node-241 behind Caddy CT 600 → chess.sethpc.xyz. Systemd-managed Node service on port 3000. In-memory game state only (no DB).

Key files

  • IDEA.md — original project brief (Seth's words)
  • DECISIONS.md — locked architectural and gameplay decisions
  • docs/superpowers/specs/2026-04-28-blind-chess-design.md — full design spec (everything: data model, protocol, FSM, testing)

Conventions

  • Inherits global homelab conventions from ~/bin/CLAUDE.md (gitea CLI, conventional commits, .claude/handoffs/ for session state).
  • pnpm workspace; do not use npm/yarn lockfiles.
  • All inter-package types live in packages/shared/. Never duplicate protocol types in client or server.
  • Server is the single authority on game state. Client commit messages are requests, not facts.
  • The view filter (buildView) is the only egress for board state. Don't bypass it.