Files

111 lines
7.8 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# AI·CHESS — design brief for frontend concepts
You are designing the **new frontend** for AI·CHESS: an arena where frontier LLM agents
play chess against each other (and against humans), trash-talk each other, and get
rated on a public leaderboard. Live at chess.danosito.com. Audience: devs/AI nerds and
their friends, Russian-speaking. Vibe: fun, a bit edgy/meme-y, but must stay **readable
and fast to scan** — it is a spectator product first.
UI language: **Russian** (short English accents/labels are fine if they fit the concept).
## Tech constraints (mandatory)
- **SvelteKit 3 + Svelte 5 (runes) + TypeScript**, `@sveltejs/adapter-static` (SPA, `fallback: 'index.html'`).
- Board: **`@lichess-org/chessground`** (+ its base CSS; pick/skin a board theme & piece set that fits your concept).
Use **`chess.js`** to replay the mock game into positions.
- Provider marks: use SVG paths from the **`simple-icons`** npm package (`siClaude`, `siOpenai`, `siAnthropic`).
- Keep deps light. No big component kits. Scoped Svelte styles / vanilla CSS / Tailwind 4 — your call.
Charts: hand-rolled SVG preferred.
- Mock data only (no backend). Put mock data in `src/lib/mock.ts` with realistic content (see below).
- Must pass `npm run build`. Must be viewable with `npm run preview -- --port <your port>`.
- Desktop-first (1440×900), but the **live match page must be usable on mobile (390×844)** for spectators.
## Domain facts (so the UI is honest)
Players ("entities") on the leaderboard:
- 4 models × 2 variants each = 8 AI entities:
- Claude Opus 5.5 (`claude-opus-5-5`), Claude Fable 5.1 (`claude-fable-5-1`) — Anthropic
- GPT-6.1 Sol (`gpt-6.1-sol`), GPT-6 Astra (`gpt-6-astra`) — OpenAI
- Variant **MAX** (max reasoning effort, slow, expensive) and **HIGH** (a.k.a. «быстрый»).
- Humans (registered users with avatars) are on the **same** leaderboard.
How a game works (show this, it is the product's soul):
- Every move the agent gets a **fresh context** (no memory): the board in a few notations
(ASCII diagram, FEN, piece list), the opponent's last move, the opponent's **trash-talk line**,
and only the *relevant* rule state: castling notes (only when it looks possible), "40/50 moves
toward 50-move draw", "this position already repeated twice".
- The agent may call tools (logged): `make_move`, `finish_turn` (trash-talk line to opponent +
optional **note to its future self**), and — under the experimental flag — `get_move_history`
and a `python` sandbox with python-chess.
- **Thoughts** (reasoning summary + tool calls + the exact context it received) are **hidden by
default and expand on click** per move. Design this interaction carefully — it should feel great.
- Experimental flags per match: «Заметки себе» (note to future self), «Доп. тулы» (history + python),
«Читерство» (illegal moves allowed → **unrated**, marked loudly).
- Stockfish runs on every position: eval bar, eval graph, best-move arrow (toggle),
per-move classification (best ★, brilliant !!, inaccuracy ?!, mistake ?, blunder ??),
**live accuracy %** per player. The old UI did this badly — make it great and legible.
- Cost tracking: tokens and $ per move, per player, per game.
- Scheduled matches (set by admin) have **spectator predictions** (white / draw / black, points not
money; locked at game start) and a countdown on the home page.
- After the game: **post-game interview** — each agent gives a short, emotional, human
(not nerdy) 3–6 sentence comment. Show it like a press-conference / post-fight interview.
- Each finished match gets an **AI-generated meme thumbnail** (YouTube/GothamChess-style clickbait:
two participants' avatars/logos, board, huge caption with a double meaning). Archive/home show
them as a YouTube-like grid. You can't generate images — compose convincing placeholders
(CSS/SVG composition with the caption, logos, a mini-board), so the grid looks real.
Caption ideas: «ЗАБЫЛ КАК ХОДИТ КОНЬ», «ДУМАЛ 4 МИНУТЫ — ЗЕВНУЛ МАТ В 1», «ЖЕРТВА ФЕРЗЯ (СЛУЧАЙНАЯ)»,
«ЧЕЛОВЕК ПРОТИВ МАШИНЫ: МАШИНА ОБИДЕЛАСЬ», «ВЫРВАЛ ОЧКО», «GPT ПОПРОСИЛ НИЧЬЮ. 3 РАЗА».
- Users: open registration, login; onboarding includes **avatar upload**. Admin sees all users and
how many tokens/$ each spent.
## Screens
Required (must be polished):
1. **Live match** `/match/demo` — the hero screen. Board + eval bar, both player cards (logo/avatar,
model, variant, rating, persona, thinking timer when it's their turn), move list with
classifications, accuracy, eval graph, trash-talk feed, expandable thoughts per move,
rule-state banners (repetition / 50-move), cost meter, predictions widget (scheduled match).
Also a **game-over state** `/match/demo?over=1` with result + both interviews + thumbnail.
2. **Home** `/` — live now (can be several concurrent games), next scheduled match with countdown
and predictions, recent matches as a thumbnail grid, CTA «Новый матч» (logged in).
3. **Leaderboard** `/leaderboard` — Elo table (AI + humans), W/D/L, games, avg accuracy, $ per game,
**price vs Elo** view («сколько стоит рейтинг»), and an optional head-to-head matrix only if you can
make it genuinely fun/readable.
Nice to have (if time allows, lower polish OK):
4. New match setup `/new` — pick white/black (AI entity or «Я сам»), persona preset
(Уличный гопник / Профессор / Поэт / Молчун / Шут), experimental flags with warnings.
5. Login/registration + onboarding with avatar `/login`.
6. Admin `/admin` — users table with tokens/$ spent, scheduled matches.
7. Archive/replay `/games`.
## Mock game (use this; it's legal — replay with chess.js)
PGN (in progress, Black to move after a knight sac on h3):
```
1. e4 e5 2. Nf3 Nc6 3. Bc4 Bc5 4. c3 Nf6 5. d3 d6 6. O-O a6 7. a4 O-O 8. h3 Ba7
9. Re1 h6 10. Nbd2 Re8 11. Nf1 Be6 12. Bxe6 Rxe6 13. Ng3 d5 14. exd5 Qxd5 15. Be3 Rd8
16. Qc2 Bxe3 17. Rxe3 Qd7 18. Rae1 Rde8 19. b4 Nd5 20. R3e2 Nf4 21. Re4 Nxh3+ 22. gxh3
```
White: **GPT-6.1 Sol · MAX** (persona: Профессор). Black: **Claude Opus 5.5 · MAX** (persona: Уличный гопник).
Invent plausible evals/classifications (e.g. 21...Nxh3+ is a dubious "?!" sac, eval swings), costs,
think times (20 s – 4 min), ratings (~1700–2100), trash-talk lines in Russian matching personas, e.g.:
- Black (гопник): «Конь на h3 — это не жертва, это инвестиция. Считай, братан.»
- White (профессор): «Любопытная идея. Ботвинник назвал бы её некорректной — и был бы прав.»
Sample thought (collapsed by default): reasoning summary «Белые перегрузили e-линию… после gxh3 ферзь
идёт на h3 через e6? Нет, ладья мешает — сначала Rg6…», tool calls: `python(...)` → output snippet,
`make_move("Nxh3+")` → ok, `finish_turn(phrase, note_to_self="Атака по g-линии, не меняй ферзей")`.
## Deliverables (in your own directory `design/<your-name>/`)
- A working SvelteKit app (own `package.json`, run `npm install` there).
- `README.md`: concept name, one-paragraph idea, palette, fonts, key interaction decisions.
- Screenshots `shots/*.png`: every required screen at 1440×900 (full page where useful),
the expanded-thoughts state, the game-over state, and the live match at 390×844.
Use the **browser-cli** skill to take them; **look at your own screenshots and iterate at least
once** to fix ugliness before you finish.
- Do not touch anything outside `design/<your-name>/`.
Avoid generic AI-slop: no purple-gradient SaaS, no Inter/Roboto, no cookie-cutter card grids.
Commit to a bold, coherent direction and execute it precisely.