docs: add repo instructions
Some checks failed
build / Linux asan (push) Has been cancelled
build / Linux release (push) Has been cancelled
build / FreeBSD build (push) Has been cancelled

This commit is contained in:
server
2026-04-14 09:08:32 +02:00
parent e99b8b0520
commit b46a2661df
2 changed files with 78 additions and 0 deletions

67
AGENTS.md Normal file
View File

@@ -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`