summaryrefslogtreecommitdiffstats
path: root/AGENTS.md
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-11-01 17:33:17 +0100
committersalmonik <salmonik@tuta.io>2026-11-01 17:33:17 +0100
commit32066e3c4903b96242cc7cbc82a43138517f3439 (patch)
treede8036124f9524b91cec47b52c655aa33619ca1b /AGENTS.md
parentv3.3.0: keep client.db in the XDG data dir, add -d/--data-dir (diff)
downloadzagan-bet-32066e3c4903b96242cc7cbc82a43138517f3439.tar.gz
zagan-bet-32066e3c4903b96242cc7cbc82a43138517f3439.zip
docs: record the GUI architecture and version lockstep; adopt GPL-3.0-or-later
Diffstat (limited to 'AGENTS.md')
-rw-r--r--AGENTS.md26
1 files changed, 21 insertions, 5 deletions
diff --git a/AGENTS.md b/AGENTS.md
index ede8d67..e784624 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -51,6 +51,18 @@
51- `ServerCore::poll` must be idempotent: it settles the round, removes the 51- `ServerCore::poll` must be idempotent: it settles the round, removes the
52 session, and pushes once. A second poll must produce nothing. 52 session, and pushes once. A second poll must produce nothing.
53 53
54## GUI
55- The GUI is a second frontend over `ClientCore`, not a second client.
56 Frontends send `Command` and render `View`; the core owns navigation and
57 state and contains no I/O or terminal types.
58- egui lives in the `gui/` workspace member. Its dependencies must never
59 enter the TUI or server build graph: no GUI crate in the root package's
60 `[dependencies]`.
61- First contact shows the fingerprint and waits for a decision before sending
62 any credentials. A changed key is a hard stop; forgetting it is explicit.
63- The GUI is themed deliberately. Default egui styling is not an acceptable
64 look; keep a style module and a reference screen.
65
54## Client TUI 66## Client TUI
55- `render_lines()` and `render()` must agree. If `render()` uses `\r\n`, 67- `render_lines()` and `render()` must agree. If `render()` uses `\r\n`,
56 count lines against the same string the cursor will erase. 68 count lines against the same string the cursor will erase.
@@ -98,14 +110,18 @@
98Use semantic versioning (`MAJOR.MINOR.PATCH`) in `Cargo.toml`. 110Use semantic versioning (`MAJOR.MINOR.PATCH`) in `Cargo.toml`.
99 111
100- **MAJOR** — breaking protocol changes (wire format, TLS trust model, 112- **MAJOR** — breaking protocol changes (wire format, TLS trust model,
101 database schema migration that can't auto-upgrade). Clients and servers 113 database schema migration that can't auto-upgrade).
102 at different MAJOR versions are incompatible. 114- **MINOR** — new features, new game types, new commands, or any change to
103- **MINOR** — new features, new game types, new commands. Backwards 115 shared semantics.
104 compatible: old clients work with new servers, new clients work with
105 old servers (they just don't see the new feature).
106- **PATCH** — bug fixes, payout corrections, refactors that don't change 116- **PATCH** — bug fixes, payout corrections, refactors that don't change
107 observable behavior. 117 observable behavior.
108 118
119Client and server are **MAJOR.MINOR lockstep**: they may differ only in the
120patch component. `HELLO <version>` is the first line after TLS; the server
121refuses a mismatch before any credentials are sent. A feature that changes
122the wire format is a MAJOR bump and a simultaneous release of both sides, not
123a compatible MINOR.
124
109Bump the version in `Cargo.toml` as the **last** step before committing 125Bump the version in `Cargo.toml` as the **last** step before committing
110a release-worthy change. The commit message should contain the new version 126a release-worthy change. The commit message should contain the new version
111number (e.g. `v0.2.0`). 127number (e.g. `v0.2.0`).