docs(dev-docs): rewrite bilingual developer handbook with real code and byte walkthroughs

Expand dev-docs with a plain-language glossary, accurate single-port server flow, real apps/server directory map and cln_set_researchable trace, un-elided 57-byte EXE patch anatomy, 6-file Native C wiring guide, real Good vs. Bad code comparisons, AI constraint prompt, and traffic-log debugging steps at 1:1 zh-CN/en parity.
This commit is contained in:
N0VAN0M4LY committed 2026-12-03 11:25:53 +08:00
1 parent e2ac4fa744
commit e79866b96e
5 files changed
+2013 -183

No files matched your search

+15 -12
View File
@@ -1,31 +1,34 @@
## Change
<!-- Describe the player-visible result and the scope of this PR. -->
<!-- Describe the player-visible result and the single focused goal of this PR. -->
## Reason and evidence
<!-- Give the target client build and the relevant game file, script, or official source. -->
<!-- For a client patch, explain why the local service or game configuration is insufficient. -->
<!-- For tuning changes, record the source and unit of the new defaults. -->
<!-- Give the target client build (e.g. 2.61.0.37) and cite the primary source: stock archive file, .nut script, RVA, or DagorEngine source path. -->
<!-- For any client patch (patches/gui, patches/exe, native/wto-net), explain why apps/server or stock BLK configuration cannot solve it. -->
<!-- For tuning changes (apps/server/tuning/*.jsonc), record the rationale, bounds, and units of the new defaults. -->
## Client compatibility
<!-- List the affected builds and any change to patch variants or version records. -->
<!-- List the tested/affected client builds and any added patch variants or patches/versions/<version>.jsonc updates. -->
<!-- Reminder: never commit patches/versions/<version>.jsonc until live isolated in-game acceptance is complete. -->
## Self-check
- [ ] No hardcoded addresses, RVAs, struct offsets, or `_ReturnAddress` checks (dynamic `patches/` captures used instead)
- [ ] No hardcoded stock game numbers or magic defaults (read from stock archives via `datasets/` or placed in `tuning/*.jsonc`)
- [ ] Layer boundaries preserved (protocol / rules / persistence / datasets; `packages/*` does not read `apps/*`)
- [ ] Scope is focused on one goal, code comments and commit messages are in English, and no unrelated files were modified
- [ ] Every command listed in **Checks run** was actually executed (including `check-gui` for `patches/gui/` and MSVC `build.ps1` for `native/`)
- [ ] No hardcoded addresses, RVAs, C++ struct offsets, or `_ReturnAddress()` checks (all native values resolved dynamically into `g_lmp` via `patches/`, with explicit `"end"` on `rel32` captures that have trailing immediate bytes)
- [ ] No hardcoded stock game numbers or silent fallback defaults (extracted from stock archives via `game-data/datasets/` or validated in `tuning/*.jsonc`)
- [ ] Layer & persistence rules preserved (`packages/*` never imports `apps/*`; domain modules stay free of network/disk I/O; profile mutations persist atomically via `PlayerProfiles` / `SaveStore` before replying)
- [ ] Toolchain & schema rules met (explicit `.ts` extensions on relative imports, `import type` for types, no `enum`/`namespace`/parameter properties; strict patch JSONC keys—e.g., no `requires` in `patches/gui/**/patch.jsonc`; new `.c` files added to `native/wto-net/build.ps1`)
- [ ] Focused on one goal, English comments / patch `title` / conventional commit message used, no AI `Co-authored-by` trailers, and no personal paths, game assets, or unredacted logs in `git diff`
- [ ] Every command listed in **Checks run** was actually executed (including `wtotools check-gui --sq ...` for `patches/gui/` and MSVC `native/wto-net/build.ps1` with zero warnings for `native/`)
## Checks run
| Command or check | Client build if relevant | Result |
| Command or check | Client build (if relevant) | Result |
| --- | --- | --- |
| | | |
## In-game acceptance
<!-- Give the screen or entry point, the action, and the expected result. Record what was observed or mark the check pending. -->
<!-- Give the exact screen or entry point, the action to perform, and the expected result in an isolated offline copy. -->
<!-- Clearly state what was observed in-game, or explicitly mark steps that are still pending live verification. -->