CI / build (push) Successful in 57s
BotHost.Decisions is the default decision maker for seats without a Decisions= token (builtin overrides it). 'first' answers from the request's JSON alone, sums and counters included. MSG_SORT_CHAIN, the field-first card prompt and the effect prompt of an unknown card now ask the maker too (built-in answers unchanged); only prompts with no choice are answered without asking, and seats with a maker log their counts per duel. Tests: the built-in --seed 7 report equals the v0.1.0 release's (tests/fixture/expected, clocks aside); first vs first, 100 duels: 15952 prompts asked, 0 handed back, 0 errors, unasked only 'chain: nothing to chain'. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
32 lines
2.6 KiB
Markdown
32 lines
2.6 KiB
Markdown
# yugioh-legacy-bots
|
|
|
|
Instructions for any coding agent. `README.md` has the layout, the contract, the build and the release.
|
|
|
|
- **The game runs this code.** Solo duels in the Unity game play these bots, so a change here is a change to the
|
|
game. Keep game behaviour identical unless the owner asked for the change; say in the commit what a player would
|
|
see differ.
|
|
- **The library stays what Unity compiles:** `netstandard2.1`, `LangVersion 9`, no Unity, Mono or
|
|
Microsoft.Data reference, no package it would ship (Newtonsoft is compile-time only). Anything it needs from the
|
|
game goes through `BotHost` (`src/YGOLegacy.Bots/Host/BotHost.cs`); a new need is a new member there, written
|
|
in `README.md`'s contract table and filed for the Unity repo.
|
|
- **Every bot decision goes through the decision seam** (`IDecisionMaker`, `src/YGOLegacy.Bots/Decisions/`, asked
|
|
by `GameBehavior.YGOL_Decide`). A new prompt handler asks `YGOL_Decide`, never the GameAI directly. With no
|
|
decision maker the seam must do nothing but call the GameAI, so the built-in brain plays as before. Request and
|
|
answer types stay plain, JSON-friendly data; a field that changes meaning bumps `DecisionRequest.version`.
|
|
Remote brains (LLM, ML) are decision makers registered by name, never edits to WindBot or the hosts. The
|
|
built-in brain's `--seed 7` report must stay equal to `tests/fixture/expected/v0.1.0-seed7-n100.json` (a test
|
|
checks); a change that alters it changes how the game plays and needs the owner.
|
|
- **Keep the namespaces the game uses** (`WindBot.*`, `YGOSharp.*`, `YGOLegacy.Bot`, `YGOLegacy.Characters`,
|
|
`YGOLegacy.Services`) and WindBot's `[YGOL]` markers on fork changes.
|
|
- **Everything builds in Docker** (`Dockerfile`); there is no `dotnet` on the hosts. `docker build --target test .`
|
|
before every push, and confirm the Gitea Actions run is green after it.
|
|
- **The engine is a release, never built here**: `engine.json` is the pin, `build/fetch-engine.sh` fetches it.
|
|
- **Releases are tags** (`vX.Y.Z`, with its `CHANGELOG.md` section). Never re-upload a release; tag a patch.
|
|
Tag only when asked.
|
|
- **The Unity repo** (`donny/yugioh-legacy-unity`) is never changed from here: work for it is a ticket. It is huge:
|
|
never a full or blob-less clone, never `git grep` over it; read single files through the Gitea API or a depth-1,
|
|
tree-less fetch of only the paths needed.
|
|
- **Test data** is `tests/fixture/game`, built by `tests/fixture/make-fixture.py` from the Unity repo's `Data/` at a
|
|
named commit. Never read or write the live Syncthing shares (`/mnt/nvme/syncthing/`).
|
|
- Git remote: Gitea (`donny`), never GitHub. Default branch `main`.
|