From b46a2661df951d551a218ed6d2db29b5cf20f092 Mon Sep 17 00:00:00 2001 From: server Date: Tue, 14 Apr 2026 09:08:32 +0200 Subject: [PATCH] docs: add repo instructions --- AGENTS.md | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ CLAUDE.md | 11 +++++++++ 2 files changed, 78 insertions(+) create mode 100644 AGENTS.md create mode 100644 CLAUDE.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..f7b7770 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,67 @@ +# AGENTS.md + +## Repository Role + +This repository contains the C++ server source and build system for: + +- `game` +- `db` +- `qc` +- smoke/login test binaries + +The current production VPS runs a Debian deployment built from `main`. + +## Working Rules + +- Prefer small, reviewable changes directly on `main`. +- Keep Debian runtime stability ahead of broad refactors. +- Do not commit `build/`, temporary captures, or host-local debug output. +- Do not commit secrets or production-only credentials. + +## Build And Test + +Typical local build: + +```bash +cmake -S . -B build -G Ninja +cmake --build build +ctest --test-dir build --output-on-failure +``` + +Important test targets: + +- `metin_smoke_tests` +- `metin_login_smoke` + +## High-Risk Areas + +Changes in these areas require extra care: + +- auth/login flow +- packet headers and packet structs +- `SecureCipher` +- `fdwatch` and socket output path +- DB login/account flow + +When changing login, auth, packet, or network behavior: + +- build and run smoke tests +- keep protocol compatibility with `m2dev-client-src` +- keep client asset behavior in sync with `m2dev-client` + +## Production Verification + +The current VPS has a root-only end-to-end login check: + +```bash +/usr/local/sbin/metin-login-healthcheck +``` + +Use it after risky auth/network/runtime changes. + +## Cross-Repo Boundaries + +- server code changes belong here +- runtime/config/systemd/docs changes belong in `m2dev-server` +- client protocol implementation changes belong in `m2dev-client-src` +- client asset/login screen/server list changes belong in `m2dev-client` diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..0072b84 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,11 @@ +# CLAUDE.md + +Follow [AGENTS.md](AGENTS.md) as the canonical repo guide. + +Short version: + +- this repo owns `game`, `db`, `qc`, and smoke/login test binaries +- prefer small changes on `main` +- auth/network/packet edits must be tested carefully +- keep protocol changes aligned with `m2dev-client-src` and `m2dev-client` +- use `/usr/local/sbin/metin-login-healthcheck` on the VPS after risky login/runtime changes