CLAUDE.md: phase moves from "local sandbox" to deployed; adds the operations recipe (tar pipe to /var/www/duplicate-chess on Caddy CT 600). DECISIONS.md: supersedes the "Deployment deferred" entry with the chosen architecture — Caddy handle_path serving the static build under the chess.sethpc.xyz origin, rather than a separate subdomain or a Fastify static mount.
3.6 KiB
Duplicate Chess
Local browser sandbox for "duplicate chess" — a four-player coupled-board chess variant.
Start Here
Read the latest handoff first: .claude/handoffs/ (most recent file).
It has session state, in-progress work, and ordered next steps.
Then check IDEA.md for the project brief, DECISIONS.md for settled choices, and
docs/superpowers/specs/2026-05-19-duplicate-chess-design.md for the full design.
Project Identity
A digitization of "duplicate chess," a four-player chess variant invented by Andrew
Freiberg (Seth's father — also the inventor of the blind-chess variant behind the
sibling blind_chess project). Four players (North, South, East, West) and four
boards (NW, NE, SW, SE); each player controls one colour on two boards and must play
the identical algebraic move on both. A captured piece leaves a frozen, capturable
"ghost" twin on the player's other board. Every individual board always remains a
legal game of orthodox chess.
This project is a local, single-operator sandbox/visualizer: one screen, all four boards, an engine that enforces the synchronized-move coupling, renders ghosts, and detects the endgame. Its purpose is to let the variant be seen and studied — the inventor's own point is that it cannot be understood from prose alone.
Current State
- Phase: v1 implemented, merged, and deployed (2026-05-19) as a third
game-mode card ("under development") on
chess.sethpc.xyz. The engine and the compass UI are complete; not yet manually browser-tested by Seth. - Repo:
git.sethpc.xyz/Seth/duplicate_chess(main). - Live URL: https://chess.sethpc.xyz/duplicate/ — static bundle on Caddy CT 600
at
/var/www/duplicate-chess/. Independent of the blind_chess server (CT 690); duplicate redeploys never restart blind_chess. Vite is built withbase: '/duplicate/'; the Caddychess.sethpc.xyzblock has ahandle_path /duplicate/*that strips the prefix and serves static files. - Local dev:
pnpm install && pnpm dev. - Stack: Vite + Svelte 5 + TypeScript,
chess.js. Single package; engine insrc/engine/(pure, DOM-free; 27 vitest tests passing), UI insrc/lib/. - Commands:
pnpm dev(run) ·pnpm build·pnpm test(engine) ·pnpm exec svelte-check --tsconfig ./tsconfig.json(typecheck). - Known follow-ups (not blocking): interactive browser test still pending (a
human task —
svelte-check+ manual is the design, see spec §8); history scrubbing is view-only whereas spec §4.3 says truncate-on-move (deviation — confirm which to keep);deserializetrusts theplayerfield on replay; move log has no round numbers. See the latest handoff in.claude/handoffs/.
Operations
- Health:
curl https://chess.sethpc.xyz/duplicate/returns the servedindex.html. - Redeploy (after a
pnpm build):No Caddy reload needed for content changes;cd dist && tar -cf - . | ssh root@192.168.0.185 \ 'cd /var/www/duplicate-chess && rm -rf assets favicon.svg icons.svg index.html && tar -xf -'file_serverserves live from disk. - Caddy config: the
chess.sethpc.xyzblock in/etc/caddy/Caddyfileon CT 600 (192.168.0.185). Thehandle_path /duplicate/*sub-block governs this app.
Conventions
- Inherits homelab conventions from
~/bin/CLAUDE.md(gitea CLI, conventional commits,.claude/handoffs/for session state). - The engine (
src/engine/) is DOM-free and the single source of truth for game state. The UI never computes legality itself. - Provisional endgame rules are marked PROVISIONAL in the spec — they are Claude's chosen defaults, not Andrew's rulings. Flag them if revisited.